Howto run privileged commands on login/logout

Rob Farmer rfarmer at
Sun Feb 7 01:01:07 UTC 2010

On Sat, Feb 6, 2010 at 4:55 PM, Erik Norgaard <norgaard at> wrote:
> Hi:
> I'm playing around with diskless operation. I'd like to be able to run
> privileged commands when a user logins or logs out:
> - on login, nfs mount the user's home directory (ok, not critical, I can
> mount /home)
> - on logout a system reboot to clean up any temporary files left from the
> session.

Not sure if it would work or not but you could try setting
/etc/csh.logout setuid root (or whatever). However, IIRC, there are
security concerns with setuid scripts (I remember previous list
discussions about setuid shell scripts but don't remember what the
verdict was).

Rob Farmer

> Is this possible, without messing arround with sudo or adding users to wheel
> or operator groups?
> Thanks, Erik
> --
> Erik Nørgaard
> Ph: +34.666334818/+34.915211157        
> _______________________________________________
> freebsd-questions at mailing list
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list