From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Change passwords and adjust password aging for local user accounts

Change passwords and adjust password aging for local user accounts

From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 2 File Access, Storage, and Security

Start my 1-month free trial

Change passwords and adjust password aging for local user accounts

- [Tutor] The main tool for managing passwords in Linux is the password command. If we type in password without any arguments, it will ask us twice for a new password then encode it and save it in the etc shadow file. However, an administrator can use the same tool to lock and unlock passwords, as well as set some account aging information. Let's cover some of the password commands, more common options. - d deletes a user's password. This is basically the state of a newly created user without a password. - e expires a password. A user with an expired password will need to reset it on the next login. - l locks the password. Note that this only locks the password. So if a user had valid SSH keys, they could log in anyway. Use account aging to lock the actual accounts. Also note that this is the lowercase L as opposed to the usermod command, which uses an uppercase L to do the same thing. - u unlocks an account password and dash uppercase s outputs the password status. In a terminal…

Contents