/etc/default/su /etc/default/login /etc/default/passwd # more su #ident "@(#)su.dfl 1.6 93/08/14 SMI" /* SVr4.0 1.2 */ # SULOG determines the location of the file used to log all su attempts SULOG=/var/adm/sulog # CONSOLE determines whether attempts to su to root should be logged # 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加固过程[]。