Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Setting default group (newgrp ?)



On Tue, 6 Jan 2009, Webb Sprague wrote:

You can just use 'sg' to run commands under differnet groups without restarting your session.

That is cool, but I definitely would like to fix the problem permanently. I am surprised that there need to be so many work-arounds....

'sg' is really just a convenient wrapper for 'newgrp'.

$ l =sg =newgrp
lrwxrwxrwx 1 root root     6 2008-09-10 09:12 /usr/bin/sg -> newgrp
-rws--x--x 1 root root 19684 2008-09-10 09:12 /usr/bin/newgrp

So, that's one "work-around" that's not a workaround. Did it work in your case, though? I'd be surprised if it worked when 'newgrp' didn't.

And the two tricks I mentioned are pretty stupid (but have worked for me). (I didn't know about 'newgrp' or 'sg' before this thread.)

Best,
Ben



Messages sorted by: Reverse Date, Date, Thread, Author