Changing group membership

Changing group membership

Post by Bill » Fri, 22 Oct 1999 04:00:00



Does anyone know how to make a particular user become part of another group
while in a shell script?

IBM has their 'switchgrp' thing but it doesn't work.

I want to run a shell script which changes the user's group membership in
order to gain write permissions in a directory where at command line they
only have read permissions.

newgrp and setgroups will not work in a shell script.

Any ideas?

 
 
 

Changing group membership

Post by Steve W. Jacks » Fri, 22 Oct 1999 04:00:00



:> Does anyone know how to make a particular user become part of another group
:> while in a shell script?
:>
:> IBM has their 'switchgrp' thing but it doesn't work.
:>
:> I want to run a shell script which changes the user's group membership in
:> order to gain write permissions in a directory where at command line they
:> only have read permissions.
:>
:> newgrp and setgroups will not work in a shell script.
:>
:> Any ideas?

You need to abandon the script idea, IMHO, and do a simple C program and
SETGID to what is needed.

= Steve =

--
Steve W. Jackson,  Montgomery, Alabama
http://www.mindspring.com/~sjacksn/stevehome.html

 
 
 

1. Group membership for a group

Hello,

my question is: Is there any possibility for a group do be a Part of
an other group?

For example:
The group "Chiefs" should be part of the group "Employees".

Is this possible or have I add the username of the group chiefs to the
group employees????

Thx.
Marty

2. Q: Router/Firewall tester

3. Group membership problem

4. looking for Unix Mod Player

5. How to do automatic group membership?

6. SLIP/PPP contention management?

7. More than 32 group membership problem

8. Affix-1_00pre2 --- Bluetooth Protocol Stack. + new drivers for Anycom and 3COM

9. group memberships

10. Membership of group

11. file permissions & group membership when uploading files via FTP

12. Problem with multi-group membership? SOLVED

13. Group Membership