/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加固過程[]。