Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How can I check that in marketing group there is a smith user.Which file should I see for it ?
Have you looked at the man page of usermod?
-d, --home HOME_DIR
The user's new login directory.
The -d option is used to set a new home directory. If you want to add a user to an additional group you use the -G option:
-G, --groups GROUP1[,GROUP2,...[,GROUPN]]]
A list of supplementary groups which the user is also a member of. Each group is separated from the next by a comma, with no intervening whitespace. The groups are subject to the same restrictions as the group given with the -g option.
If the user is currently a member of a group which is not listed, the user will be removed from the group. This behaviour can be changed via the -a option, which appends the user to the current supplementary group list.
Also you can check group membership simply by using:
well one thing confusing me that when i create a new user like xyz user I can see its name in /etc/group file as
and if I add xyz user into marketing then in /etc/group file it show
The question is when a new user is just created by its entry is also shown in /etc/group file .What is the reason ?
When you create a new user, automatically a group with the same name gets created. This groupID (gid) gets used for example when the user creates a file. Then the default group association of that file will be that same groupID. Hope that helps. You can change that group association at any time. You can also add a user to additional groups as explained above. Sycamorex pointed you to a very good tutorial in post #3, I suggest you read it, it contains very good information.