creating groups in unix - without using /etc/group


creating groups in unix - without using /etc/group

Postby Renato Serodio » Sat, 04 Oct 2003 03:22:49 GMT


I'm looking for a way to let users (standard) create their own groups - 
that is, without giving root access to anyone nor rw rights to 
/etc/group. The whole idea is to have users create groups composed of 
other system users (no new people) so that they can set permissions for 
reasonably large amounts of people or files without having to use setfacl.

I've been unsuccessful so far in my digging, but I did find an 
interesting clue at this site 

I wrote the admin asking how they did it, but they naturally know less 
that unix than me, and answered: 'groups is a standard unix setting, we 
didn't write anything'. It is true, and fair enough, if you're referring 
to the command that simply lists the current user's group...

Re: creating groups in unix - without using /etc/group

Postby Joe Durusau » Wed, 08 Oct 2003 04:45:13 GMT

To  the O.P.:  It would seem to be a real mess, as groupd memberships
are in
the passwd file, and to get something like this to work, you would need
to write a wrapper of some sort to let the users run grpadd, grpdel, and
the priv. stuff in passwd.  It sould certainly be done, but I would
strongly why someone would want to do it.  After all, what happens if
deletes the wrong group??

Speaking only for myself,

Joe Durusau

Re: creating groups in unix - without using /etc/group

Postby Nicholas Bachmann » Wed, 08 Oct 2003 07:39:23 GMT

Huh?  You mean /etc/group?

My suggestion, if the OP is sure he doesn't want to just do it himself, 
is to allow each "group manager" to keep their line of the group file in 
their home directory.  Then, use a cron job to put together a new groups 
file based on those files (checking that they're valid lines and the 
users haven't added groups, of course).  Perl would be my suggestion for 
the script.

+   Regards,                                      +
+   Nick                                          +
+                                                 +
+   My email address is real                      +

Similar Threads:

1./etc/groups - system group question

Can groups be assigned within the /etc/group file?

For instance:
system:!:0: user1,user2,user3

These userids are located in the /etc/passwd file.

In the same /etc/group file I also have a "user2" group with many
users (close to 100).

My question is, do all user2 group users have root capabilities, or is
this just limited to the ID from the /etc/passwd file?

I am not a Unix administrator, so I can not test. I appreciate any

Thank you

2./etc/group length name -- pw add group no more the 16 characters

Hi all,

I've wrote together a little shell script which creates a 
/etc/mail/aliases from /etc/group and some other files.
The reason for this is that my inexperienced admin can add users on the 
windows machine with webmin so it get's an e-mail account.
And by the fact that my security groups are virtual equal to my mail 
list groups.
By putting the user in a unix group the user will be put in the a 
multi-reception alias (and a address book for openwebmail). Quite happy 
with the results I began testing and quickly found out that when I do pw 
group add groupnamewithmorethen16characters I get the following:

# pw group add groupwithmorethen16characters
pw: name too long `groupwithmorethen16characters' (max is 16)

Ok that fair enough but where is is then a gecos field like described in 
man master.passwd to display a more visual friendly name to the users?
I've worked around it by aliases then actual group name with a more in 
the aliases file, since that is the primary reason for a nice name.

What is the reason /etc/group can not have a group name longer than 16 
characters and why would it be not advisable to change that?
I began looking to NIS for easier administration but how does NIS cope 
with long group names (isn't it just a auto-distributed copy)?.

I really would appreciate if somebody would shed a little li-(nk)|(ght) 
for me on this matter.


3.Using MIT KDC on Linux with Windows Login without AD using local group Guests

4.Trying to create a lunch generator for my group using BASH or

Marco Parrone wrote:
> Jeremy L. on 1 Nov 2004 08:16:30 -0800 writes:
>>1. How do I tell random to use a range of 0-10 instead of 0-32767...
> $(($RANDOM*10/32767))



5.sync /etc/passwd and /etc/group with a Windows PDC


I am running debian/unstable and I am looking for an easy way to
synchronise my linux user(s)/password(s) with a Windows PDC.
Do I need to use an LDAP server
Where can i find an howto that gives a step-by-step explanation of how to
do it ?


6. Create XML outputfile from a parsed unix groups file

7. Changing group permission using java in unix

8. Unix shell: please help: /etc/group does not contain my group name!!!

Return to unix


Who is online

Users browsing this forum: No registered users and 85 guest