LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
Password
SUSE / openSUSE This Forum is for the discussion of Suse Linux.

Notices


Reply
  Search this Thread
Old 08-05-2006, 07:47 AM   #1
gurl4sh25
Member
 
Registered: Apr 2006
Distribution: SuSE, RedHat, Fedora, CentOS, BSD
Posts: 115

Rep: Reputation: 15
creating users and groups


Hi Guys,

Just want to ask some questions upon creating users and assigning to groups. I am using SLES9, when i create a new user, and assigned it into a new group (ex: newgroup), why does this newly created user is still a member of the group "users"? i issue a command ls -l on the dir of /home and it says "users", here are the commands i used upon creating and assigning to a group:

groupadd newgroup
useradd -m newuser -p password -g newgroup

now when i issue a command ls -l on the directory of /home is see this

6 root root 144 Jul 23 02:36 .
22 root root 144 Jul 23 03:36 ..
12 newuser users 144 Jul 23 04:36 newuser

why does the newuser still in the group users??

in the file /etc/passwd:

newuser:x:1003:100::/home/newuser:/bin/bash

and also in the file of /etc/group:

newgroup:!:1000:newuser

now, how come in the file "passwd" the "newuser" is on the group of 100 which equivalent to the group "users"
instead of 1000?? and when i issue the command ls -l on the dir of /home it says "users" instead of "newgroup"... ?


i'm really confused here, any guys would like to help me with this one??
 
Old 08-05-2006, 11:40 AM   #2
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
The syntax in your commands is the cause of your problems. In your second command you have created a user called newgroup instead of a user called newuser. You have also ended up creating a group called newuser. You should do the following.
Code:
#groupadd newgroup
#useradd -m -g newgroup newuser
#passwd newuser
 
Old 08-05-2006, 12:01 PM   #3
gurl4sh25
Member
 
Registered: Apr 2006
Distribution: SuSE, RedHat, Fedora, CentOS, BSD
Posts: 115

Original Poster
Rep: Reputation: 15
Hey thanks reddaz

I'ved tried what you've said, and it works, maybe i'll try to experiment on this commands, THANK YOU VERY MUCH.. =)
 
Old 08-05-2006, 12:02 PM   #4
gurl4sh25
Member
 
Registered: Apr 2006
Distribution: SuSE, RedHat, Fedora, CentOS, BSD
Posts: 115

Original Poster
Rep: Reputation: 15
Hey thanks reddaz

I'ved tried what you've said, and it works, maybe i'll try to experiment on this commands, THANK YOU VERY MUCH.. =)
 
  


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
What are users and what are groups? harisund Linux - Newbie 5 12-06-2005 12:33 PM
creating groups, adding users, and setting permissions bowie101 Linux - Newbie 2 11-23-2005 12:42 PM
users and groups twb2005 Linux From Scratch 2 10-10-2005 01:47 PM
Creating Groups... gfrair Linux - Newbie 2 01-31-2005 07:38 PM
creating groups spank Linux - Newbie 2 11-02-2003 02:54 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 02:21 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
Open Source Consulting | Domain Registration