1. groupadd - To Create Group
groupadd <name of group>
2. user mod - To add User in Particular Group
usermod -G <group name> <username>
usermod -G < Grp1 , Grp2 , Grp3 > <username>
* If you add that particular user to another group it will remove that user from existing group . So , Solution for this Problem is use -a to Append.
usermod -aG <group name> <username>
*If you Want to add Comment at user Credential Location
usermod -c "Hi this is important user" <username>
* If you are Working on AWS Install User Utils
yum install util-linux-user
3. chfn - Change Finger Print Information
chfn -f <name> -o <office no.> -p <phone no.> -h <home no.> <user name>
4. usermod -d - to change path of user
usermod -d /home/userhome <username>
5. chown - to change owner of any file or Directory
chown <new user> <path where files & directories >
6. chgrp - Change group of any file or Directory
chgrp -cv <new group name> <path where files & directories >
7. chown - To Change group & user of file Directory with single Command
chown <user> : <group> <path where files & directories >
8. usermod -md - copy all stuff of old user to new user
user mod -md <path of user> <user>
No comments:
Post a Comment