Mailinglist Archive: opensuse (720 mails)
| < Previous | Next > |
Re: [S.u.S.E. Linux] shoutdown ?
- From: jae@xxxxxxxxxxxxxxxxxxx (Jaeha Lee)
- Date: Sun, 19 Apr 1998 02:15:19 +1000 (EST)
- Message-id: <Pine.LNX.3.96.980419021419.2258A-100000@localhost>
Thank you very much really !!!
Cheers
jae
On Sat, 18 Apr 1998, Juergen Braukmann wrote:
>
> Jaeha Lee wrote:
> >
> > hi,
> >
> > I read man page about "sudoers", but too many things I don't understand.
> > please can you give me simple example, I'm not on the network, it's truly
> > stand-alone home PC.
> >
>
> OK, here we go. I give you my /etc/sudoers:
>
> --------------------------8<----------------------------------------
> # sudoers file.
> #
> # This file MUST be edited with the 'visudo' command as root.
> #
> # See the man page for the details on how to write a sudoers file.
> #
>
> # Host alias specification
> Host_Alias LOCAL=slartibartfast
> # User alias specification
> User_Alias SYSTEM=braukman,dk4jb
> # Cmnd alias specification
> Cmnd_Alias DOWN=/sbin/halt
> # User privilege specification
> root ALL=(ALL) ALL
> SYSTEM LOCAL=DOWN
> # brauki is allowed to shutdown slartibartfast without giving his
> password:
> brauki slartibartfast=NOPASSWD:DOWN
> # and so might his alter ego braukman ;-)
> braukman slartibartfast=/sbin/halt NOPASSWD:ALL
> #
> --------------------------8<----------------------------------------
>
>
> to shout down my system I issue a 'sudo /sbin/halt'. I am not asked to
> give my password, since I turned that off. that should do the trick. you
> must install the sudo-package first.
>
> an other tip to shut down a system is the following:
> create a user say... down
>
> modify /etc/passwd:
>
> [...]
> nobody:x:-2:-2:nobody:/tmp:/bin/bash
> brauki:x:500:100:Juergen Braukmann:/home/brauki:/bin/bash
> down:x:0:100:shutdownuseer:/tmp:/sbin/halt
> [...]
> ^^^^^^^^^^^
> switch to another console log in as down and enjoy. ;-)
>
> (I have not tried that one, but I remember someone sugesting that...)
>
> Jürgen
>
>
> ps: I have just tried that, it works if you give "down"
> the uid 0 (root)
>
> it's a good idea, to have a password on that account, too ;-)
>
> in my opinion it comes next to ctrl-alt-del, the proper way is
> sudo. nice to be root and able to change messages already in
> /etc/mqueue ... ;-))
>
> wq
> ^^ oupps.. wrong editor ;-)
>
> --
> ========================================== __ _
> Jürgen Braukmann e-mail: brauki@xxxxxx | / / (_)__ __ ____ __
> Tel: 0201-743648 dk4jb@db0qs.#nrw.deu.eu | / /__/ / _ \/ // /\ \/ /
> ========================================== /____/_/_//_/\_,_/ /_/\_\
> --
> To get out of this list, please send email to majordomo@xxxxxxxx with
> this text in its body: unsubscribe suse-linux-e
>
>
--
To get out of this list, please send email to majordomo@xxxxxxxx with
this text in its body: unsubscribe suse-linux-e
| < Previous | Next > |