LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 12-28-2009, 12:30 PM   #1
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,019

Rep: Reputation: 63
How to add/remove groups with user?


Code:
gpasswd -a username -g audio,...
What are the other options?
 
Old 12-28-2009, 12:40 PM   #2
samac
Senior Member
 
Registered: Mar 2004
Location: Westray, Orkney
Distribution: Slackware64-14.1 (multi-lib) KDE 4.11.4
Posts: 1,422

Rep: Reputation: 137Reputation: 137
kde has kuser.

samac
 
Old 12-28-2009, 12:41 PM   #3
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,019

Original Poster
Rep: Reputation: 63
Quote:
Originally Posted by samac View Post
kde has kuser.

samac
i don't have kde installed.
 
Old 12-28-2009, 12:46 PM   #4
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,380

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
I don't know if I understood the question: are you asking about gpasswd options? "man gpasswd".
if you want to add/remove groups commands are groupadd and groupdel (references about it are also in "man gpasswd").
 
Old 12-28-2009, 12:52 PM   #5
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,019

Original Poster
Rep: Reputation: 63
Quote:
Originally Posted by ponce View Post
I don't know if I understood the question: are you asking about gpasswd options? "man gpasswd".
if you want to add/remove groups commands are groupadd and groupdel (references about it are also in "man gpasswd").
Other command line options to add or remove groups(not gpasswd command).
 
Old 12-28-2009, 12:56 PM   #6
cola
Senior Member
 
Registered: Sep 2007
Location: Dhaka,Bangladesh
Distribution: Debian
Posts: 1,019

Original Poster
Rep: Reputation: 63
Suppose there is a user account "firstuser".
audio,mail and root groups are added with "firstuser".

Now i want to add video,mysql,games groups with "firstuser" and remove mail group from "firstuser".
 
Old 12-28-2009, 02:16 PM   #7
ponce
Senior Member
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 2,380

Rep: Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840Reputation: 840
Code:
gpasswd -a firstuser video
gpasswd -a firstuser mysql
gpasswd -a firstuser games
gpasswd -d firstuser mail
(sorry if I repeat, it's written right in "man gpasswd")
if you want to remove a group from /etc/groups use groupdel
Code:
groupdel yourgroup
if you want you can edit also directly the group file with "vigr": if you don't like vi (shame on you ) set a different EDITOR environment variable before launching, like "export EDITOR=pico",for example.

remember that you have to logout and relogin with your user for changes to take effect for him.

Last edited by ponce; 12-28-2009 at 02:20 PM.
 
  


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
How to identify and remove user groups from an aborted X Windows install? joeebel Linux - Newbie 1 09-29-2009 05:49 PM
Is it possible to add/remove a user to a group without logging out and in again? [KIA]aze Linux - General 12 03-01-2009 05:49 PM
What groups to add a new user to? prophet621 Linux - Newbie 2 03-02-2005 11:17 AM
An easy way to remove large program groups? KneeLess Debian 6 03-15-2004 08:17 AM
Cant add MySQL through add/remove programs Hero Doug Fedora 6 01-03-2004 10:35 PM


All times are GMT -5. The time now is 12:26 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration