user shutdown command

user shutdown command

Post by Lei Ch » Mon, 14 Apr 1997 04:00:00



If anyone is interested, the easiest way to allow all users to shutdown
is through 'chmod u+s /sbin/shutdown' This command is only recommended
for single user linux, so I'm told, it will allow anyone to use the shutdown
command. If you want to avoid logging on as root as much as possible,
this is the way to go.

 
 
 

user shutdown command

Post by Tim Krame » Mon, 14 Apr 1997 04:00:00



> If anyone is interested, the easiest way to allow all users to shutdown
> is through 'chmod u+s /sbin/shutdown' This command is only recommended
> for single user linux, so I'm told, it will allow anyone to use the shutdown
> command. If you want to avoid logging on as root as much as possible,
> this is the way to go.

The newer versions don't allow this.  Even though you can run
the command, it checks to see what account is calling it.

 
 
 

user shutdown command

Post by It's Only Carl » Mon, 14 Apr 1997 04:00:00




>> If anyone is interested, the easiest way to allow all users to shutdown
>> is through 'chmod u+s /sbin/shutdown' This command is only recommended
>> for single user linux, so I'm told, it will allow anyone to use the shutdown
>> command. If you want to avoid logging on as root as much as possible,
>> this is the way to go.

>The newer versions don't allow this.  Even though you can run
>the command, it checks to see what account is calling it.

Check out 'sudo'.

Carlo

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%                                          %                               %
% Carlo Graziani                           % "Stwike, wightning! Stwike    %
% Department of Astronomy and Astrophysics %  the wabbit!"                 %
% University of Chicago                    %                               %
%                                          %                               %

%                                          % e-mail spammers.              %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

 
 
 

user shutdown command

Post by Thomas Okke » Tue, 15 Apr 1997 04:00:00



> If anyone is interested, the easiest way to allow all users to
> shutdown is through 'chmod u+s /sbin/shutdown' This command is only
> recommended for single user linux, so I'm told, it will allow anyone
> to use the shutdown command. If you want to avoid logging on as root
> as much as possible, this is the way to go.

No, it's not. The best way to go that I've found is sudo. This is how
my /etc/sudoers looks to enable me to bring down the system as an
ordinary user:
----------------------------------------------------------------------
root    ALL=(ALL) ALL
thomas  bittybox=NOPASSWD:/sbin/shutdown -[hr] now
----------------------------------------------------------------------
Note that I, the ordinary user, am "thomas", "bittybox" is what I call
my computer, NOPASSWD means I don't want to have to type a password in
order to do a shutdown, /sbin/shutdown is where shutdown lives, and
the "-[hr] now" stuff means I can only say "shutdown -r now" or
"shutdown -h now" without going root. (Just thought I'd explain all
this because the sudo manpage is one of those rare cases of truly
horrendous documentation...)
Also, sudo is the only way to go for those *very* security-conscious
commands that check the *real* uid/gid (as opposed to the *effective*
uid/gid, which is what the setuid/setgid bits affect).

--
Thomas Okken

 
 
 

user shutdown command

Post by Rich Dubraws » Fri, 18 Apr 1997 04:00:00


: >
: > If anyone is interested, the easiest way to allow all users to shutdown
: > is through 'chmod u+s /sbin/shutdown' This command is only recommended
: > for single user linux, so I'm told, it will allow anyone to use the shutdown
: > command. If you want to avoid logging on as root as much as possible,
: > this is the way to go.

I found that the simplest solution for me was the su1 program (available at sunsite when I found it.
su1 allows me to set up a file (su1.priv) in the etc directory specifying users by name ane
assigning each user ( or group of users) access to specific programs or aliases defined in the
su1.priv file such as cdmount cdumnt etc. that they can run using su1 program.  I then alias
shutdown to 'su1 shutdown' or whatever and the privledged user can now shutdown the system.
The power lives in the su1.priv file ( and it also keeps a log file) which allows me to give
rich permission to mount various devices and shutdown, but may only give kevin permission
to shutdown.  This is much safer than making the shutdown shell script have superuser
status which could be abused.  It is not a perfect system, but by keeping the su1.priv file
writeable only by root, it is safer than some.

--
Richard Dubrawski

I didn't like the play, but I saw it under adverse conditions.  The
curtain was up.

 
 
 

user shutdown command

Post by Jim Fol » Sun, 20 Apr 1997 04:00:00


I read a better way: edit the /etc/inittab entry for shutdown and change
the options to -h instead of -r. Then, people at the keyboard can halt
the PC by hitting ctrl+alt+del but no user can execute the halt, reboot
or shutdown coammnds.

: If anyone is interested, the easiest way to allow all users to shutdown
: is through 'chmod u+s /sbin/shutdown' This command is only recommended
: for single user linux, so I'm told, it will allow anyone to use the shutdown
: command. If you want to avoid logging on as root as much as possible,
: this is the way to go.

 
 
 

user shutdown command

Post by Mike Willett LADS LDN X11 » Sat, 26 Apr 1997 04:00:00


Personnally, I found creating a user shutdown was a nice
easy way. The user obviously doesn't run /bin/bash but
/root/myshutdown/shutdown which is an setuid copy
of shutdown in a restricted directory.

Only those with the password can therefore shutdown
the machine.

Mike Willett