how to create a user, which can't be su'd to ?
Kartik Subbarao
subbarao at phoenix.Princeton.EDU
Sat Jan 19 03:23:40 AEST 1991
In article <1460 at nixsin.UUCP> koerberm at nixsin.UUCP (Mathias Koerber) writes:
>Howdy,
>
>I have a (small) system, which I want all my staff to be able to shutdown in
>the evening, without having to give them full root access. So i created a user
>"shut", whose .profile calls /etc/shutdown with all the necessary parameters.
>
>I want to protect this account against being accessed via su, so that it is not
>used accidentally. How can I do this?
To avoid all hassles of making a new user with user id 0, you can simply
write a small C program (as opposed to a problematic shell script) that
execl's /etc/shutdown with the desired parameters, and make that program
set UID root.
i.e:
main()
{
execl ("/etc/shutdown", "shutdown", "Your arguments here", (char *) 0);
}
and everything is okay.
-Kartik
--
internet# find . -name core -exec cat {} \; |& tee /dev/tty*
subbarao@{phoenix or gauguin}.Princeton.EDU -|Internet
kartik at silvertone.Princeton.EDU (NeXT mail) -|
SUBBARAO at PUCC.BITNET - Bitnet
More information about the Comp.unix.questions
mailing list