Re: Allowing a normal user to run a command (shutdown) as root

2005-01-07 Thread John Rye
On Wed, 05 Jan 2005 13:20:14 +1300
Hugo Vincent [EMAIL PROTECTED] wrote:

{snip}

  You young fellers have gotta start remembering that your parents' new
  idea processing skills are no way near as capabable as yours any more
  that your own can match the those capabilities if a say 5 year-old!
 
  KISS
 
  John
 
 Thats what I would have liked to do, but for some reason the menu 
 options are not there! Selecting logout from the KDE desktop only 
 allows you to log out (not shut down) and the kdm login screen does not 
 have shutdown or restart buttons either - I don't know why - my other 
 Mandrake installation had them by default. I suspect that they aren't 
 there because I installed it with the High Security Level option 
 (figuring that they are less likely to break anything then). I thought 
 I could add a item on the KDE start menu that called shutdown -h now, 
 but that didn't work (you must be root to do this). I will try the 
 chmod u+s method suggested by Robert Himmelmann tonight.

Hugo, would you check if you have mdkkdm installed, this is the
Mdk-modified version of kdm and has the logout/stutdow/restart submenu

the rpm for 9.2 is: mdkkdm-9.2-21mdk.i586.rpm so the version for 10.x
should be pretty simmilar in name.

Cheers

John


pgpbLZadptcsK.pgp
Description: PGP signature


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-06 Thread Christopher Sawtell
On Thu, 06 Jan 2005 20:45, Nick Rout wrote:
 On Thu, January 6, 2005 12:17 pm, Barry said:
  Steve Holdoway wrote:
  Barry wrote:
  Just done a test on my M10 install with level 3 startup and icewm.
 
  1. ctl-alt-del to kill X
  2. ctl-alt-bs to reboot.
 
  I think I'd swap these two around if I were you (:
 
  Steve
 
  Ooops - you are correct, sorry
 
  Tested kde for M10 this morning. ctl-alt-del 1st time killed X, 2nd time
  rebooted. Very simple, no scripts needed.

 but didn't acheive the aim of shutting the computer down (as opposed to
 rebooting it)

If you change the '-r' to '-h' in the line containing shutdown
in the file /etc/inittab it will turn the machine off.

Like this:-

ca:12345:ctrlaltdel:/sbin/shutdown -h now


-- 
Sincerely etc.,
Christopher Sawtell


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-06 Thread Nick Rout
On Thu, January 6, 2005 9:07 pm, Christopher Sawtell said:
 On Thu, 06 Jan 2005 20:45, Nick Rout wrote:
 On Thu, January 6, 2005 12:17 pm, Barry said:
  Steve Holdoway wrote:
  Barry wrote:
  Just done a test on my M10 install with level 3 startup and icewm.
 
  1. ctl-alt-del to kill X
  2. ctl-alt-bs to reboot.
 
  I think I'd swap these two around if I were you (:
 
  Steve
 
  Ooops - you are correct, sorry
 
  Tested kde for M10 this morning. ctl-alt-del 1st time killed X, 2nd
 time
  rebooted. Very simple, no scripts needed.

 but didn't acheive the aim of shutting the computer down (as opposed to
 rebooting it)

 If you change the '-r' to '-h' in the line containing shutdown
 in the file /etc/inittab it will turn the machine off.

 Like this:-

 ca:12345:ctrlaltdel:/sbin/shutdown -h now

No no no, I mean yes that will work, but this is supposed to be a
solutoin for someones parents who may have little skills. the right
solution for the distro concerned is what was called for IMHO



 --
 Sincerely etc.,
 Christopher Sawtell





Re: Allowing a normal user to run a command (shutdown) as root

2005-01-05 Thread Hugo Vincent
OK this worked! Thanks.
Hugo.
On 5/01/2005, at 8:10 AM, Robert Himmelmann wrote:
Use chmod u+s /sbin/shutdown then everyone can use /sbin/shutdown 
-h 0 or something.



Re: Allowing a normal user to run a command (shutdown) as root

2005-01-05 Thread Barry

Steve Holdoway wrote:
Barry wrote:
Just done a test on my M10 install with level 3 startup and icewm.
1. ctl-alt-del to kill X
2. ctl-alt-bs to reboot.
I think I'd swap these two around if I were you (:
Steve
Ooops - you are correct, sorry
Tested kde for M10 this morning. ctl-alt-del 1st time killed X, 2nd time 
rebooted. Very simple, no scripts needed. May still be desirable to shut 
down apps 1st. I often use alt-F4

Barry
3. you may have to shut down progs first if you wish to keep settings, 
or if confirmation is required.

with M8.2 only 2 and 3 apply
Will test with KDE later
KIS
Barry

Hugo Vincent wrote:
Hi everybody,
I set up a PC for my parents to do their email on, with Mandrake 10 
and Firefox/Thunderbird, but for some reason, their is no Shutdown 
item on the menu. I can't remember how to allow the normal user to 
run /sbin/shutdown as root (something in /etc/sudoers perhaps)? Can 
someone please shed some light on the situation.

Cheers,
Hugo.







Re: Allowing a normal user to run a command (shutdown) as root

2005-01-05 Thread Nick Rout
On Thu, January 6, 2005 12:17 pm, Barry said:


 Steve Holdoway wrote:
 Barry wrote:

 Just done a test on my M10 install with level 3 startup and icewm.

 1. ctl-alt-del to kill X
 2. ctl-alt-bs to reboot.

 I think I'd swap these two around if I were you (:

 Steve

 Ooops - you are correct, sorry

 Tested kde for M10 this morning. ctl-alt-del 1st time killed X, 2nd time
 rebooted. Very simple, no scripts needed.

but didn't acheive the aim of shutting the computer down (as opposed to
rebooting it)

 May still be desirable to shut
 down apps 1st. I often use alt-F4

 Barry

 3. you may have to shut down progs first if you wish to keep settings,
 or if confirmation is required.

 with M8.2 only 2 and 3 apply

 Will test with KDE later

 KIS

 Barry
 

 Hugo Vincent wrote:

 Hi everybody,

 I set up a PC for my parents to do their email on, with Mandrake 10
 and Firefox/Thunderbird, but for some reason, their is no Shutdown
 item on the menu. I can't remember how to allow the normal user to
 run /sbin/shutdown as root (something in /etc/sudoers perhaps)? Can
 someone please shed some light on the situation.

 Cheers,
 Hugo.













Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Steve Holdoway
Hugo Vincent wrote:
Hi everybody,
I set up a PC for my parents to do their email on, with Mandrake 10 
and Firefox/Thunderbird, but for some reason, their is no Shutdown 
item on the menu. I can't remember how to allow the normal user to run 
/sbin/shutdown as root (something in /etc/sudoers perhaps)? Can 
someone please shed some light on the situation.

Cheers,
Hugo.
Hi Hugo,
The easiest way I've found ( stolen from an old Honeywell unix system 
over 15 years ago! ) is to create a shutdown user, and run shutdown as 
it's shell. You nay need to use vipw to set it all up, but I've found 
it's worth it.

Cheers,
Steve
( On that particular machine, switching the power off led to the 
following message on the system console, which still makes me laugh to 
this day...

   Power fa
)


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Ross Drummond
On Tue, 04 Jan 2005 22:45, Hugo Vincent wrote:
 Hi everybody,

 I set up a PC for my parents to do their email on, with Mandrake 10 and
 Firefox/Thunderbird, but for some reason, their is no Shutdown item on
 the menu. I can't remember how to allow the normal user to run
 /sbin/shutdown as root (something in /etc/sudoers perhaps)? Can someone
 please shed some light on the situation.

 Cheers,
 Hugo.

On Mandrake 10 try the  halt  command if a user at the command line shell.

If Mandrake 10 is set up for a graphical login Shut down the computer should 
be an option in the dialog box launched when the Logout menu item is 
selected .

Cheers Ross Drummond


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Robert Himmelmann
Hugo Vincent wrote:
Hi everybody,
I set up a PC for my parents to do their email on, with Mandrake 10 
and Firefox/Thunderbird, but for some reason, their is no Shutdown 
item on the menu. I can't remember how to allow the normal user to run 
/sbin/shutdown as root (something in /etc/sudoers perhaps)? Can 
someone please shed some light on the situation.

Cheers,
Hugo.

Use chmod u+s /sbin/shutdown then everyone can use /sbin/shutdown -h 
0 or something.

--
Happy Hacking
+---+
|If you don't know what 'Happy Hacking' means, read |
|the book 'Free as in Freedom', published under |
|http://www.oreilly.com/openbook/freedom/index.html |
+---+
|Use free software only. See|
|http://www.gnu.org/philosophy/free-sw.html |
+---+
|Please avoid sending me Microsoft Word attachments.|
|For more information, see: |
|http://www.fsf.org/philosophy/no-word-attachments.html |
+---+


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Derek Smithies
Hi,
 And you can do 
ln -fs /sbin/shutdown /usr/bin/shutdown

and then shutdown is in the typical users path, so the user just does
shutdown -h now

Derek.
On Wed, 5 Jan 2005, Robert Himmelmann wrote:

 Hugo Vincent wrote:
 
  Hi everybody,
 
  I set up a PC for my parents to do their email on, with Mandrake 10 
  and Firefox/Thunderbird, but for some reason, their is no Shutdown 
  item on the menu. I can't remember how to allow the normal user to run 
  /sbin/shutdown as root (something in /etc/sudoers perhaps)? Can 
  someone please shed some light on the situation.
 
  Cheers,
  Hugo.
 
 
 Use chmod u+s /sbin/shutdown then everyone can use /sbin/shutdown -h 
 0 or something.
 
 

-- 
Derek Smithies Ph.D.   This PC runs pine on linux for 
email
IndraNet Technologies Ltd. If you find a virus apparently 
from me, it has
Email: [EMAIL PROTECTED]forged  the e-mail headers on 
someone else's machine
ph +64 3 365 6485  Please do not notify me when 
(apparently) receiving a
Web: http://www.indranet-technologies.com/ windows virus from me..



Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread John Rye
On Tue, 04 Jan 2005 22:45:53 +1300
Hugo Vincent [EMAIL PROTECTED] wrote:

 Hi everybody,
 
 I set up a PC for my parents to do their email on, with Mandrake 10 and 
 Firefox/Thunderbird, but for some reason, their is no Shutdown item on 
 the menu. I can't remember how to allow the normal user to run 
 /sbin/shutdown as root (something in /etc/sudoers perhaps)? Can someone 
 please shed some light on the situation.

Why would id be needed? Afterall you say you have them using Firefox
and Thunderbird.

Why not use the logout option from the the main menu and at the next gui
panel select Turn off Compter Now and click OK

Seems a great simpler from my point of view.

Mucking about with heaps of scripts  to get around what I think is a
'standard' safety feature is not going to make any difference to your
parents in the long term anyway,

And! If you've converted them from Windows - they'll be used to the vey
same sequence anyway!

You young fellers have gotta start remembering that your parents' new
idea processing skills are no way near as capabable as yours any more
that your own can match the those capabilities if a say 5 year-old!

KISS

John


pgpjinLAV4pYD.pgp
Description: PGP signature


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Hugo Vincent
HI John,
On 5/01/2005, at 9:29 AM, John Rye wrote:
On Tue, 04 Jan 2005 22:45:53 +1300
Hugo Vincent [EMAIL PROTECTED] wrote:
Hi everybody,
I set up a PC for my parents to do their email on, with Mandrake 10 
and
Firefox/Thunderbird, but for some reason, their is no Shutdown item on
the menu. I can't remember how to allow the normal user to run
/sbin/shutdown as root (something in /etc/sudoers perhaps)? Can 
someone
please shed some light on the situation.
Why would id be needed? Afterall you say you have them using Firefox
and Thunderbird.
Why not use the logout option from the the main menu and at the next 
gui
panel select Turn off Compter Now and click OK

Seems a great simpler from my point of view.
Mucking about with heaps of scripts  to get around what I think is a
'standard' safety feature is not going to make any difference to your
parents in the long term anyway,
And! If you've converted them from Windows - they'll be used to the vey
same sequence anyway!
You young fellers have gotta start remembering that your parents' new
idea processing skills are no way near as capabable as yours any more
that your own can match the those capabilities if a say 5 year-old!
KISS
John
Thats what I would have liked to do, but for some reason the menu 
options are not there! Selecting logout from the KDE desktop only 
allows you to log out (not shut down) and the kdm login screen does not 
have shutdown or restart buttons either - I don't know why - my other 
Mandrake installation had them by default. I suspect that they aren't 
there because I installed it with the High Security Level option 
(figuring that they are less likely to break anything then). I thought 
I could add a item on the KDE start menu that called shutdown -h now, 
but that didn't work (you must be root to do this). I will try the 
chmod u+s method suggested by Robert Himmelmann tonight.

Thanks,
Hugo.


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread yuri
On Wed, 05 Jan 2005 13:20:14 +1300, Hugo Vincent wrote:
 Mandrake installation had them by default. I suspect that they aren't
 there because I installed it with the High Security Level option

Well there's your problem. Lighten up on the security (take it down
one notch at a time until the shutdown option re-appears).

 (figuring that they are less likely to break anything then). I thought

They are more likely to break something by turning the computer off
without a proper shutdown. Without the root password there's very
little they can muck up other than their own user profiles, and the
highest security level won't even prevent that.

 I could add a item on the KDE start menu that called shutdown -h now,
 but that didn't work (you must be root to do this). I will try the
 chmod u+s method suggested by Robert Himmelmann tonight.

Or you could try that instead

-- 
** WARNING to mailing list repliers **
Gmail over-rides Reply-To: field. Check your To: address before
sending reply to this post.


Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Barry
Just done a test on my M10 install with level 3 startup and icewm.
1. ctl-alt-del to kill X
2. ctl-alt-bs to reboot.
3. you may have to shut down progs first if you wish to keep settings, 
or if confirmation is required.

with M8.2 only 2 and 3 apply
Will test with KDE later
KIS
Barry

Hugo Vincent wrote:
Hi everybody,
I set up a PC for my parents to do their email on, with Mandrake 10 and 
Firefox/Thunderbird, but for some reason, their is no Shutdown item on 
the menu. I can't remember how to allow the normal user to run 
/sbin/shutdown as root (something in /etc/sudoers perhaps)? Can someone 
please shed some light on the situation.

Cheers,
Hugo.




Re: Allowing a normal user to run a command (shutdown) as root

2005-01-04 Thread Steve Holdoway
Barry wrote:
Just done a test on my M10 install with level 3 startup and icewm.
1. ctl-alt-del to kill X
2. ctl-alt-bs to reboot.
I think I'd swap these two around if I were you (:
Steve
3. you may have to shut down progs first if you wish to keep settings, 
or if confirmation is required.

with M8.2 only 2 and 3 apply
Will test with KDE later
KIS
Barry

Hugo Vincent wrote:
Hi everybody,
I set up a PC for my parents to do their email on, with Mandrake 10 
and Firefox/Thunderbird, but for some reason, their is no Shutdown 
item on the menu. I can't remember how to allow the normal user to 
run /sbin/shutdown as root (something in /etc/sudoers perhaps)? Can 
someone please shed some light on the situation.

Cheers,
Hugo.