You can prevent unauthorized logins to a system or the network through password assignment and login control. A password is a simple authentication mechanism. All accounts on a system must have a password. An account without a password makes your entire network accessible to an intruder who guesses a user name. A strong password algorithm protects against brute force attacks.
When a user logs in to a system, the login command checks the appropriate naming service or directory service database according to the information in the name switch service, svc:/system/name-service/switch. To change values in a naming service database, you use the SMF commands. The naming services indicate the location of the databases that affect login:
files – Designates the /etc files on the local system
ldap – Designates the LDAP directory service on the LDAP server
nis – Designates the NIS database on the NIS master server
dns – Designates the domain name service on the network
For a description of the naming service, see the nscd(1M) man page. For information about naming services and directory services, see Working With Oracle Solaris 11.2 Directory and Naming Services: DNS and NIS and Working With Oracle Solaris 11.2 Directory and Naming Services: LDAP .
The login command verifies the user name and password that were supplied by the user. If the user name is not in the password database, the login command denies access to the system. If the password is not correct for the user name that was specified, the login command denies access to the system. When the user supplies a valid user name and its corresponding password, the system grants the user access to the system.
PAM modules can streamline logging in to applications after a successful system login. For more information, see Chapter 1, Using Pluggable Authentication Modules, in Managing Kerberos and Other Authentication Services in Oracle Solaris 11.2 .
Sophisticated authentication and authorization mechanisms are available on Oracle Solaris systems. For a discussion of authentication and authorization mechanisms at the network level, see Authentication and Authorization for Remote Access.
When users log in to a system, they must supply both a user name and a password. Although logins are publicly known, passwords must be kept secret. Passwords should be known only to each user. Users must choose their passwords carefully and change them often.
Passwords are initially created when you set up a user account. To maintain security on user accounts, you can set up password aging to force users to routinely change their passwords. You can also disable a user account by locking the password. For detailed information about administering passwords, see Chapter 1, About User Accounts and User Environments, in Managing User Accounts and User Environments in Oracle Solaris 11.2 and the passwd(1) man page.
If your network uses local files to authenticate users, the password information is kept in the system's /etc/passwd and /etc/shadow files. The user names and other information are kept in the /etc/passwd file. The encrypted passwords themselves are kept in a separate shadow file, /etc/shadow. This security measure prevents a user from gaining access to the encrypted passwords. While the /etc/passwd file is available to anyone who can log in to a system, only the root account can read the /etc/shadow file. You can use the passwd command to change a user's password on a local system.
If your network uses NIS to authenticate users, password information is kept in the NIS password map. NIS does not support password aging. You can use the command passwd -r nis to change a user's password that is stored in an NIS password map.
The Oracle Solaris LDAP naming service stores password information and shadow information in the ou=people container of the LDAP directory tree. On the Oracle Solaris LDAP naming service client, you can use the passwd -r ldap command to change a user's password. The LDAP naming service stores the password in the LDAP repository.
Password policy is enforced on the Oracle Directory Server Enterprise Edition. Specifically, the client's pam_ldap module follows the password policy controls that are enforced on Oracle Directory Server Enterprise Edition. For more information, see LDAP Naming Services Security Model in Working With Oracle Solaris 11.2 Directory and Naming Services: LDAP .
Strong password encryption provides an early barrier against attack. Oracle Solaris software provides six password encryption algorithms. The Blowfish and SHA algorithms provide robust password encryption.
You specify the algorithms configuration for your site in the /etc/security/policy.conf file. In the policy.conf file, the algorithms are named by their identifier, as shown in the following table. For the identifier-algorithm mapping, see the /etc/security/crypt.conf file.
The algorithm is included in the list of allowed algorithms to be used for password encryption.
The identifier is not _unix_.
For procedures describing how to switch algorithms for password encryption, see Changing the Default Algorithm for Password Encryption.
The default algorithms configuration in the policy.conf file is as follows:
# … # crypt(3c) Algorithms Configuration # # CRYPT_ALGORITHMS_ALLOW specifies the algorithms that are allowed to # be used for new passwords. This is enforced only in crypt_gensalt(3c). # CRYPT_ALGORITHMS_ALLOW=1,2a,md5,5,6 # To deprecate use of the traditional unix algorithm, uncomment below # and change CRYPT_DEFAULT= to another algorithm. For example, # CRYPT_DEFAULT=1 for BSD/Linux MD5. # #CRYPT_ALGORITHMS_DEPRECATE=__unix__ # The Oracle Solaris default is a SHA256 based algorithm. To revert to # the policy present in Solaris releases set CRYPT_DEFAULT=__unix__, # which is not listed in crypt.conf(4) since it is internal to libc. # CRYPT_DEFAULT=5 …
When you change the value for CRYPT_DEFAULT, the passwords of new users are encrypted with the algorithm that is associated with the new value.
When existing users change their passwords, the way their old password was encrypted affects which algorithm is used to encrypt the new password. For example, assume that CRYPT_ALGORITHMS_ALLOW=1,2a,md5,5,6, and CRYPT_DEFAULT=6. The following table shows which algorithm would be used to generate the encrypted password. The password consists of identifier=algorithm.
|
For more information about configuring the algorithm choices, see the policy.conf(4) man page. To specify password encryption algorithms, see Changing the Default Algorithm for Password Encryption.
The root account is one of several special system accounts. Of these accounts, only the root account is assigned a password and can log in. The nuucp account can log in for file transfers. The other system accounts either protect files or run administrative processes without using the full powers of root.
![]() | Caution - Never change the password setting of a system account. System accounts from Oracle Solaris are delivered in a safe and secure state. Do not revise or create system files with a UID that is 101 or less. |
The following table lists some system accounts and their uses. The system accounts perform special functions. Each account on this list has a UID that is less than 100. For a full listing of system files, use the command logins –s.
|
Remote logins offer a tempting avenue for intruders. Oracle Solaris provides several commands to monitor, limit, and disable remote logins. For procedures, see Table 3–1.
By default, remote logins cannot gain control or read certain system devices, such as the system mouse, keyboard, frame buffer, or audio device. For more information, see the logindevperm(4) man page.