Skip to main content

Posts

Showing posts with the label useradd command in linux. userdel command in linux usermod command in linux groupadd command in linux groupdel command in linux /etc/passwd /etc/group /etc/shadow how to add user in linux

Linux user account management.

Topics to be Covered in todays blogpost: How to add a user (useradd)? How to delete a user (userdel)? How to modify the user (usermod)? How to add the group? (groupadd)? How to delete a group? (groupdel)?  Files we will take a look at : /etc/passwd /etc/group How to Create a user ? useradd <username> How to identify if the user is created ? id <username> when you add the user 'shan' , automatically group called 'shan' is created.as you can see in the below snip that user and group of 'shan' is 'shan'. Also 'shan' directory automatically gets created in home directory. Question: How to create a user called 'victor' who is the part of QA team ,whose group is 'QA' ,shell type is '/bin/bash'? Also we want directory called 'victor' to be created in the home directory. Answer: useradd -g QA -s /bin/bash -c "Part of QA Team" -m -d /home/victor victor As you can see in the above snip that directory of