Table of Contents

Prompt user to enter user name and password

Synopsis

  login

Examples

Prompt user to enter user name and password

  login
  echo Hello ${username}

Boot from iSCSI target using CHAP authentication

  login
  sanboot iscsi:10.0.4.1:::1:iqn.2010-04.org.ipxe.dolphin:storage

Boot from web server using HTTP authentication

  login
  chain http://${username:uristring}:${password:uristring}@my.web.server/boot.ipxe

Description

Display a login screen and allow the user to enter a user name and the corresponding password. The password will be obscured using asterisks.

A login screen

The provided user name and password will be stored in the username and password configuration settings.

Command status

Success The user name and password settings were applied successfully
Failure The user name and password settings were not applied successfully

See also

Notes

The user is able to use Ctrl-C (or Escape) to exit the login prompt without entering a user name or password. You may therefore wish to always handle failures of the login command. For example:

  login || goto cancelled

If you need to customise the login screen in any way, you can use the present command to display a custom form. The login command is equivalent to using the commands:

  form
  item          username  Username
  item --secret password  Password
  present