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.
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.
10
minutes, type the
following:lock -10
See the lock or the xlock command in Commands Reference for the complete syntax.
- 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