User Creation With Specific Properties
User Creation With Specific Properties
Question:
Create two users: john with uid/gid equal to 2000, password 12345678 and davis with uid/gid
equal to 3000, password 87654321. Make davis' account validity stopping in one month.
Right now is the time to change validity of davis account. On my system (CentOS) I've run:
Given that we know the current date we can set expiry date manually:
Additional comment:
Remember there is a difference between password expiration and account validation. It is usually
better to expire password and make user not being able to log into the system or disable the user,
rather than deleting it.
Trying to create user with already taken UID will result in an error.