# to the named device
#CONSOLE=/dev/console
# PATH sets the initial shell PATH variable
#PATH=/usr/bin:
# SUPATH sets the initial shell PATH variable for root
#SUPATH=/usr/sbin:/usr/bin
# SYSLOG determines whether the syslog(3) LOG_AUTH facility should be used
# to log all su attempts. LOG_NOTICE messages are generated for su's to
# root, LOG_INFO messages are generated for su's to other users, and LOG_CRIT
# messages are generated for failed su attempts.
SYSLOG=YES # more login
#ident "@(#)login.dfl 1.10 99/08/04 SMI" /* SVr4.0 1.1.1.1 */
# Set the TZ environment variable of the shell.
#
#TIMEZONE=EST5EDT
# ULIMIT sets the file size limit for the login. Units are disk blocks.
# The default of zero means no limit.
#
#ULIMIT=0
# If CONSOLE is set, root can only login on that device.
# Comment this line out to allow remote login by root.
#
CONSOLE=/dev/console 限制root访问
CONSOLE=/dev/console
Root用户只能在console口上登录,任何其它的root用户登录都将报错。
# CONSOLE=/dev/console
Root用户能够从任何设备上登录,包括网络、Modem、其它终端等。
CONSOLE=
Root用户不能从任何地方登录。要成为root用户只有一个办法,首先使用普通用户登录,然后使用su命令转换为root用户。切记,在禁用root远程登录之前一定要确保系统里还有其它的用户可以登录。不然就会出现惊险的Solaris加固过程[http://www.amxku.net/archives/reinforcement-solaris/]。
用户密码策略
# more passwd
#ident "@(#)passwd.dfl 1.3 92/07/14 SMI"
MAXWEEKS=27 #密码最长存活周期
MINWEEKS=1 #密码最短存活周期
PASSLENGTH=8 #密码长度最小值
MINALPHA=2 ;MINNONALPHA=1 #至少包括两个字母和一个非字母
# 注意:/etc/shadow文件中设置的时间优先级高于/etc/default/passwd文件中设置的时间
管理远程访问
/etc/hosts.equiv 文件
$HOME/.rhosts 文件
/etc/ftpusers 文件 ==远程访问流程








