Locking your terminal (lock or xlock command)

Use the lock command to lock your terminal. The lock command requests your password, reads it, and requests the password a second time to verify it.

In the interim, the command locks the terminal and does not relinquish it until the password is received the second time. The timeout default value is 15 minutes, but this can be changed with the -Number flag.
Note: If your interface is AIXwindows, use the xlock command in the same manner.
For example, to lock your terminal under password control, type the following:
lock

You are prompted for the password twice so the system can verify it. If the password is not repeated within 15 minutes, the command times out.

To reserve a terminal under password control with a timeout interval of 10 minutes, type the following:
lock -10

See the lock or the xlock command in Commands Reference for the complete syntax.

start of change
Authentication

The xlock command is a Pluggable Authentication Module (PAM) enabled X server command that locks the X server until the user enters a password. It supports both local UNIX authentication and PAM authentication for unlocking the X server.

You can set the system-wide configuration to use PAM for authentication by providing root user access and by modifying the value of the auth_type attribute to PAM_AUTH in the usw stanza of the /etc/security/login.cfg file.

The authentication mechanisms that are used when PAM is enabled are dependent on the configuration of the login service in the /etc/pam.conf file. The xlock command requires the /etc/pam.conf file entry for the auth, account, password, and session module types. The following configuration is recommended for the /etc/pam.conf file entry in the xlock command:

xlock               auth                 required           pam_aix

xlock               account              required           pam_aix

xlock               password             required           pam_aix      

xlock               session              required           pam_aix
end of change