LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 11-20-2009, 03:19 AM   #1
dhawanmayur
LQ Newbie
 
Registered: Sep 2004
Posts: 1

Rep: Reputation: 0
Unable to add group


Hi,
I am trying to add group in RHEL. when I use the command group , I get result as "group already exists", however when I try to see the /etc/group file there does not exist an entry for this group.

After this when I try to add a user to this group I again get an result like "user already exists", But again this user can't be seen in the /etc/passwd file.

Please let me know whether there is some error I am doing. I am executing commands from /usr/sbin/useradd and /usr/sbin/groupadd.

thanks in advance.
dhawanmayur
 
Old 11-20-2009, 04:34 AM   #2
centosboy
Senior Member
 
Registered: May 2009
Location: london
Distribution: centos5
Posts: 1,137

Rep: Reputation: 116Reputation: 116
Quote:
Originally Posted by dhawanmayur View Post
Hi,
I am trying to add group in RHEL. when I use the command group , I get result as "group already exists", however when I try to see the /etc/group file there does not exist an entry for this group.

After this when I try to add a user to this group I again get an result like "user already exists", But again this user can't be seen in the /etc/passwd file.

Please let me know whether there is some error I am doing. I am executing commands from /usr/sbin/useradd and /usr/sbin/groupadd.

thanks in advance.
dhawanmayur
make sure this user and group does not exist in

/etc/passwd
/etc/group
/etc/shadow
 
Old 11-20-2009, 07:19 AM   #3
Lee_Ball
Member
 
Registered: Jul 2005
Location: Manchester (UK)
Distribution: Fedora CentOS
Posts: 132

Rep: Reputation: 18
Are you trying to create a new group or add a user to an existing group?

Try this command:

Code:
grep -r -i "{groupname}" /etc/
put the group you're trying to create in instead of {groupname}

This will then output a list of files from /etc/ which contain the group you're searching for.
 
  


Reply



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
group: add complete group into other group max_mad SUSE / openSUSE 1 04-12-2006 01:43 AM
add a group to a group amon Linux - Security 4 04-07-2006 05:48 PM
cannot add new group in RH jimberg51 Linux - General 1 06-08-2005 01:13 PM
Add a group to a group? Temujin_12 Linux - Security 2 06-08-2005 03:58 AM
[alert] (22) Invalid argument : setgid : unable to set group id to Group 4294967295 Niraj Linux - Networking 1 12-13-2001 06:58 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:44 PM.

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
Open Source Consulting | Domain Registration