Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Seeking User & Group Management Advice


Peter Hardy wrote:

>From what I can see, not many people bother using group passwords,
>including me. So documentation is fairly sparse.
>
>Here be dragons.

Yikes!
[snip]

>If you decide to chase that any further, I'd like to hear how you
>go. :-)

Ok so far I've discovered the "gpasswd" command which allows me to set a password for the group and apparently apoint an administrator of the group though my idea is to have the user su to the matlab user then newgrp back to their own group (each user being in a group of one). So perhaps I can appoint the user as the administrator of their own group of one at account creation time.

So I login as peter, su matlab (without the '-' which means I stay in my directory though my uid/gid is now matlab,matlab) I then $ newgrp peter, which prompts me for the group password and I'm now still in my home directory with uid=matlab, gid=peter. I now run matlab able to read/write files in my own account . When matlab finishes I need to undo the newgrp and su commands I just need it all wrapped up in a script, hmmm.........

Peter Chub wrote:

Use sudo rather than su, and use a wrapper to provide exclusivity.

[snip] (Boy three Peters in one thread, who'd thought)

Ok, I think I follow, sudo can run a command as another user, cool, That command needs to be newgrp, then matlab, then exit newgrp. Another dragon?

I'll follow that line for a bit I thinks

P.