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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Thank you for your help. I have googled but I only end up with Linux User groups from around the world (communities or something).
I have come across a situation where I need to make a group so that someone can have access to a certain folder without having access to anything else and the main user.
I would please like to know:
How to see what groups already exist. (and their members?)
How to make a new group.
How to add a user to a group.
How to delete a user from the group.
How to delete a group.
Help is greatly appreciated. I am curious about something.. when a new user is created i notice that the username is for both user and group. does this mean that each user automatically has their own group?
take a look at the file /etc/group - that lists the group names, group ID, and the list of users in the groups. you can just edit this file manually - or there are gui-based user managers, like kuser as well.
thanks for the reply. on the system that i am setting this up on, i dont actually have a gui. commandline only.
i was hoping for commands for each. i also dont entirely understand the structure of the /etc/group file so I denno how quick I'll be to directly edit.
But as far as viewing the current groups its proved perfect, thank you.
Hi chi,
You can just use groupadd <grp name> command for adding group. U can use usermod command for changing existing users group and useradd -g <primy grp> -G <sec group> username for new user. For deleting any user from the group you just simply remove user name from /etc/group file. For deleting group use groupdel command. For more information on command see man <command>.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.