Understanding group and passwd


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Understanding group and passwd
# 1  
Old 11-28-2010
Understanding group and passwd

Hi,

I am checking who belong to the dba group ,
and found that oracle and autosys users are part of this group
cat /etc/group | grep dba
dba::400Smilieracle,autosys

I thought to found user autosys under group 400 togther with user
oracle , but found it in group 1000 as you can see bellow.
cat /etc/passwd | grep -w 400
oracle:*:130:400::/software/oracle:/bin/ksh
extjob:*:131:400::/home/extjob:/sbin/sh
yoavb:*:119:400::/home/yoavb:/usr/bin/ksh

cat /etc/passwd | grep autosys
autosys:*:1000:1000::/home/autosys:/sbin/sh

Can one explain me where i am wrong ?
Thanks
# 2  
Old 11-28-2010
There are "Primary" group (group used when login) (see option -g of useradd or adduser depending your OS) and "Secondary" group : see option -G (uppercase) of useradd or adduser depending on your OS.

For your autosys user, dba is a "secondary" group (its primary group is GID 1000)
For your user oracle, dba is the "primary" group

Also refer to the man pages of the relating commands like :

man adduser or useradd (see option -g and -G)
man id
man groups
man newgrp

Last edited by ctsgnb; 11-28-2010 at 05:17 PM..
# 3  
Old 11-30-2010
Further to ctsgnb. It is not usual to itemise the membership of Primary Groups in /etc/group.
In your example the account "oracle" has Primary Group 400 and does not need to be listed in Group 400 in /etc/group . It is however harmless.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Conflicting GID in group and passwd files.

Hi guys, I have a question. In the passwd file, user johndoe has a GID of 100 which is the group named users in the group file. But if you check the group file, johndoe is not listed under GID 100, but under GID 33, which is the group named videos. Under what group does johndoe really belong,... (1 Reply)
Discussion started by: goldenlight1814
1 Replies

2. AIX

When did AIX start using /etc/security/passwd instead of /etc/passwd to store encrypted passwords?

Does anyone know when AIX started using /etc/security/passwd instead of /etc/passwd to store encrypted passwords? (1 Reply)
Discussion started by: Anne Neville
1 Replies

3. Shell Programming and Scripting

need a one liner to grep a group info from /etc/group and use that result to search passwd file

/etc/group tiadm::345:mk789,po312,jo343,ju454,ko453,yx879,iy345,hn453 bin::2:root,daemon sys::3:root,bin,adm adm::4:root,daemon uucp::5:root /etc/passwd mk789:x:234:1::/export/home/dummy:/bin/sh po312:x:234:1::/export/home/dummy:/bin/sh ju454:x:234:1::/export/home/dummy:/bin/sh... (6 Replies)
Discussion started by: chidori
6 Replies

4. UNIX for Dummies Questions & Answers

Inconsistency between passwd and group

Hi, I have a passwd file with 3 users belonging to the the root group (gid=0), but the group file does not list these users as members of the root group? Shoud I be worried and apart from manually changing it, how can it be remediated? thx Norgaard (1 Reply)
Discussion started by: Norgaard
1 Replies

5. Solaris

passwd cmd reenables passwd aging in shadow entry

Hi Folks, I have Solaris 10, latest release. We have passwd aging set in /etc/defalut/passwd. I have an account that passwd should never expire. Acheived by emptying associated users shadow file entries for passwd aging. When I reset the users passwd using passwd command, it re enables... (3 Replies)
Discussion started by: BG_JrAdmin
3 Replies

6. Shell Programming and Scripting

ypcat group, ypcat passwd

When i run the following command on our server ypcat group or ypcat passwd I get list of groups and users respectively. I am not sure whether this list is only for the groups or users on the particular server on which i executed the command or all the groups and users on all the servers in... (2 Replies)
Discussion started by: pinnacle
2 Replies

7. UNIX for Dummies Questions & Answers

is it really not possible for me to edit the etc/group & the etc/passwd files?

From what I have read it possible to create a new group by editing the etc/group and etc/passwd in UNIX two files but a non-experienced user may face many problems such as destroying the file by mistake ot that his changes to these file does not make any difference. However, there is this... (2 Replies)
Discussion started by: whatev3r
2 Replies

8. AIX

Volume Group Understanding

Looking for help in understanding volume groups. On the internal disks is it possible to have other volume groups other then root vg? If so would the other vg be captured in the mksysb? Any documentation links that you can point me to on volume groups and such woudl be welcomed. Thanks (1 Reply)
Discussion started by: cogsworth12000
1 Replies

9. UNIX for Dummies Questions & Answers

grep group and passwd file

How can I find find all members in the /etc/password file that belong to the dba group in the /etc/group file? (4 Replies)
Discussion started by: mozartny
4 Replies
Login or Register to Ask a Question