1826388 Members
4698 Online
109692 Solutions
New Discussion

/etc/group problem

 
iambluegary
Advisor

/etc/group problem

in /etc/group,
pin::1001:

does it mean nobody belongs to it,or everyone belongs to it?
help ,help,help :-)
5 REPLIES 5
Michael Tully
Honored Contributor

Re: /etc/group problem

Hi,

You need to look in the /etc/passwd file
to see how many users have this group (1001)
This is called the default group. Not having
any in the /etc/group indicates that no user
has 'pin' as a secondary group.

# grep 1001 /etc/passwd
will find the users that have this group as
it's primary.

HTH
~Michael~
Anyone for a Mutiny ?
Hartmut Lang
Trusted Contributor

Re: /etc/group problem

No user can change to group "pin" using the newgrp command.

But users can belong to "pin" if the have the gid 1001 in their passwd-entry.

Hardy
Animesh Chakraborty
Honored Contributor

Re: /etc/group problem

Hi,
The /etc/group file does *NOT* need to keep a record of the user's default group found in /etc/passwd. Many revisions ago this was true and the LINE TOO LONG error was created when SAM would blindly concatenate more user ID's on the same line.

For example the default user group is groupID=20 and known as users, then the only information needed about users is:

users::20:

Hope this help
Animesh

Did you take a backup?
Shannon Petry
Honored Contributor

Re: /etc/group problem

As for not being able to chgrp to it, last I checked you can only chgrp into a group you belong to. Makes the secondary primary.

If you dont have a secondary, how can you make it primary?

Regards,
Shannon
Microsoft. When do you want a virus today?
MANOJ SRIVASTAVA
Honored Contributor

Re: /etc/group problem

Hi Iambluegary

A set of users form a group , however a group can also be formed by single user too. The information in /etc/group has tells that there can be a single user or multiple user using the pin as the group name , this you identify using cat /etc/passwd | grep 1001 and look for the field after the uid . It can also be possible that a user was greated and deleted but the group for that user was not deleted. Also you can just run id after lgging in to get the uid and the gid for that user. In case there are users which share seconday memnership thos will appear after the last : in the /etc/group file.


Manoj Srivastava