1832616 Members
3485 Online
110043 Solutions
New Discussion

Re: group to group ?

 
SOLVED
Go to solution
jerry1
Super Advisor

group to group ?

Why does group permissions not follow
standards. Should be able to add group to group
to avoid line limitation and having to add
hundreds of accounts to groups.

Example:

group1:*:
group2:*:group1

grpchk group

group2:*:2:group1
group1 - Logname not found in password file



ALso, User is not part of group2 and should be.

$ id
uid=5783(user1) gid=610(group1)

7 REPLIES 7
Sundar_7
Honored Contributor
Solution

Re: group to group ?

If you have hundreds of accounts to add to a group then you can have multiple entries for the same group

For ex

group1:*:user1,user2,....user400
group1:*:user401,user402,....,user900

this way you can work around the limitation.
Learn What to do ,How to do and more importantly When to do ?
jerry1
Super Advisor

Re: group to group ?

Okay, I have 10's of thousands of accounts
to add. NO WAY!. HP should follow Sun's
rules with Sun's NIS.

It does not.
A. Clay Stephenson
Acclaimed Contributor

Re: group to group ?

What you can do is create multiple group entries with a comon GID, e.g.

dog::125:tom,dick,harry
dog2::125:see,spot,run
dog3::125:look,jane


It's really not even necessary to put members in the group file because the GID is picked up from the passwd entry. Only when you need users to be members of multiple group do they actually need an entry in the group file and in that case /etc/group and /etc/logingroup should be linked.
If it ain't broke, I can fix that.
A. Clay Stephenson
Acclaimed Contributor

Re: group to group ?

What you can do is create multiple group entries with a common GID, e.g.

dog::125:tom,dick,harry
dog2::125:see,spot,run
dog3::125:look,jane


It's really not even necessary to put members in the group file because the GID is picked up from the passwd entry. Only when you need users to be members of multiple group do they actually need an entry in the group file and in that case /etc/group and /etc/logingroup should be linked.
If it ain't broke, I can fix that.
Sundar_7
Honored Contributor

Re: group to group ?

I thought linking /etc/group and /etc/logingroup was only necessary in 10.20. In 11.0 and above whether or not you have /etc/logingroup linked to /etc/group, user is granted permissions of all the groups he/she belongs to and dont have to use newgrp command.
Learn What to do ,How to do and more importantly When to do ?
SSO Montgomery
Advisor

Re: group to group ?

I'm trying to find answers to what Sundar mentioned. I have a case where a user has a supplementary group, but is unable to do a "cat" on a file in that group. If user executes "newgrp" then "cat" works fine. I thought multiple groups in 'real-time' worked.
SSO Montgomery
Advisor

Re: group to group ?

Okay, never mind. Sorry for the premature post. Apparently, needed the user to log off and back in after adding user name to the /etc/group file.