分类: 其他平台
2017-06-29 20:37:19
[root@fan3838 ~]# diff /etc/init/tty.conf ~/tty.conf.original 9c9 < exec /sbin/mingetty --autologin root $TTY --- > exec /sbin/mingetty $TTY [root@fan3838 ~]#但是这样是6个终端全部自动登录到root,还需要修改。开始想的是将每个终端都写明,不过发现不通过,google搜索资料后解决。
[root@fan3838 ~]# cat /etc/init/tty.conf # tty - getty # # This service maintains a getty on the specified device. # # Do not edit this file directly. If you want to change the behaviour, # please create a file tty.override and put your changes there. stop on runlevel [S016] respawn instance $TTY #exec /sbin/mingetty --autologin root $TTY #### CUT-HERE #### script if [ x$TTY = x"/dev/tty2" ] || [ x$TTY = x"/dev/tty3" ]; then export AUTOLOGIN="--autologin" export USER="root" fi exec /sbin/mingetty $AUTOLOGIN $USER $TTY end script #### CUT-HERE #### usage 'tty TTY=/dev/ttyX - where X is console id' [root@fan3838 ~]#