root@arm:~# getty --help
Usage:
getty [options] line baud_rate,... [termtype]
getty [options] baud_rate,... line [termtype]
Options:
-8, --8bits assume 8-bit tty
-a, --autologin <user> login the specified user automatically
-c, --noreset do not reset control mode
-f, --issue-file <file> display issue file
-h, --flow-control enable hardware flow control
-H, --host <hostname> specify login host
-i, --noissue do not display issue file
-I, --init-string <string> set init string
-l, --login-program <file> specify login program
-L, --local-line force local line
-m, --extract-baud extract baud rate during connect
-n, --skip-login do not prompt for login
-o, --login-options <opts> options that are passed to login
-p, --loginpause wait for any key before the login
-R, --hangup do virtually hangup on the tty
-s, --keep-baud try to keep baud rate after break
-t, --timeout <number> login process timeout
-U, --detect-case detect uppercase terminal
-w, --wait-cr wait carriage-return
--noclear do not clear the screen before prompt
--nonewline do not print a newline before issue
--no-hostname no hostname at all will be shown
--long-hostname show full qualified hostname
--version output version information and exit
--help display this help and exit
编辑/etc/inittab文件,修改getty选项。
# Example how to put a getty on a modem line.
#
#T3:23:respawn:/sbin/mgetty -x0 -s 57600 ttyS3
S0:23:respawn:/sbin/getty -L ttyS0 115200 vt102
最后一行修改成如下:
S0:23:respawn:/sbin/getty -a root -L ttyS0 115200 vt102
然后我们passwd -d root 删掉root用户密码。
-a表示自动以root用户登入。