To change a password for another user:
# passwd [username]To lock an account and unlock an account:
# passwd -l [username]WARNING: If Locking the root account ensure that you have allowed and tested access with sudo first!
# passwd -u [username]
Users and Groups Creation and DeletionTo list the groups a user is a member of:
# groups [username]Groups:
# groupadd [groupname]To create a user and set primary group:
# useradd -g [groupname] [username]To create a user and set secondary group:
# useradd -G [groupname] [username]To add group to existing users secondary groups:
# usermod -a -G [groupname] [username]To delete a user:
#userdel -r [username]-r deletes the users home directory as well as account
Misc
To see a summary of logins to date (leave username blank to see all logins):
# last [username]
No comments:
Post a Comment