# useradd user_name [to add a new user]
# passwd user_name [to set user password]
# userdel user_name [to delete a user]
# passwd -d user_name [to delete user password]
# groupadd group_name [to add a new group]
# groupdel group_name [to delete a group]
*When an user is created , it makes five new changes-
1. /etc/password [contains user id, group id etc]
2. /etc/group [contains group information]
3. /etc/shadow [password encryption]
4. /home/user_directory [new directory is created]
5. /var/spool/mail/user_directory [user mail box is created]
# cat /etc passwd or group or shadow [to show password/shodow/group]
*Arif : X : 532 : 535 : : /home/arif/bin/bash
UserName UserID User Group ID
# usermod -c “ “ user_name [to write comment between password]
Arif : X : 532 : 535 : : /home/arif/bin/bash
# id -u user_name [to show user ID]
# usermod -u 700 user_name [to change user ID as 700]
# id -g user_name [to show user group ID as 800]
# groupmod -g 800 user_name [to change group ID]
# passwd -l user_name [to lock a user]
# passwd -u user_name [to unlock a user]
No comments:
Post a Comment