Lab 6
Lab 6
Lab 6
Pre-Lab
useradd, passwd, userdel, usermod, chage, chgrp, touch
Commands
1. Set the minimum password age for user1 to 7 days. Set the
maximum password age for user1 to 90 days. Set a password
Post Lab
expiration warning for user1 to 7 days. Verify the password
aging settings.
1. Create a New User (user1)
Create user1:
Create group1:
The -m option moves the content from the old home directory to the new one.
This set of commands will help you manage users and groups effectively in a
RHEL/CentOS system.
1. Set the minimum password age for user1 to 7 days. Set the
maximum password age for user1 to 90 days. Set a password
Post Lab
expiration warning for user1 to 7 days. Verify the password
aging settings.
chage -M 90 username
chage -m 90 username
Passwd user1
Cat /etc/passwd
This will set the number of days in advance the user will begin receiving
warnings that the password will expire.
For example:
# passwd -w 7 user2