LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 10-10-2005, 12:04 AM   #1
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Rep: Reputation: 15
viewing, adding(to), deleting(from) groups


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?

Thank you kindly for your response.

-Chi
 
Old 10-10-2005, 12:15 AM   #2
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
hi chibi

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.

 
Old 10-10-2005, 12:30 AM   #3
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Original Poster
Rep: Reputation: 15
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.
 
Old 10-10-2005, 12:45 AM   #4
dhruvypatel
Member
 
Registered: Oct 2005
Location: Bangalore,India
Distribution: Debian
Posts: 37

Rep: Reputation: 15
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>.
 
Old 10-10-2005, 11:14 PM   #5
chibi
Member
 
Registered: Aug 2004
Location: Canada
Distribution: Debian
Posts: 62

Original Poster
Rep: Reputation: 15
thank you kindly. thats what I needed
 
Old 10-11-2005, 01:16 AM   #6
jrdioko
Member
 
Registered: Oct 2002
Distribution: Debian 6.0.2 (squeeze)
Posts: 944

Rep: Reputation: 30
I've always found this useful:

http://www.slackbook.org/html/essent...SYSADMIN-USERS

(and the next page in that book)
 
Old 10-16-2005, 09:38 PM   #7
Genesee
Member
 
Registered: Dec 2002
Distribution: Slackware
Posts: 927

Rep: Reputation: 30
Quote:
Originally posted by dhruvypatel
For more information on command see man <command>.
that's always good advice, dhruvypatel

for ex., here try:

man group
man passwd

same for just about any program on your system. there's lots of documentation available -- not always easy to understand, but it's there
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
creating groups, adding users, and setting permissions bowie101 Linux - Newbie 2 11-23-2005 01:42 PM
Adding more groups to files djchris Linux - Security 1 07-27-2005 11:36 AM
Simple script for adding groups to Linux kenji1903 Programming 20 06-03-2004 11:14 PM
Adding user and groups manon Linux - Newbie 3 04-26-2004 01:14 PM
Adding secondary groups thepurpleblob Linux - General 1 09-03-2003 11:19 AM


All times are GMT -5. The time now is 10:52 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration