[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [shell-script] su
From: |
Julio Neves |
Subject: |
Re: [shell-script] su |
Date: |
Wed, 5 Sep 2001 09:54:59 -0300 |
Favor responder a address@hidden
Para: address@hidden
cc:
Assunto: [shell-script] su
solaris:
Hi,
i am writing a little script for a user to run to
perform a shutdown.
How in this script i do "su" and include the password
for the "root"
so that the user should not deal with it?.
Jim
=================================================================================
This is not the most secure way. Everybody can read the root's password at
this script. Why don't you try this:
1 - Write a script named ShutItDown with a single line with the shutdonw
command.
2 - Create a user named ShutDownAgent
3 - edit the /etc/passwd and:
3.1 - Change the user id to 0 (zero). Every user with UID=0 is a root
3.2 - Change the last field of this record (the name of its default shell)
to /<path>/ShutItDown.
Every time ShutDownAgent logs in, the computer will be shuted down and you
don't need to explicit the root's password.
[ ]s,
Julio
- Re: [shell-script] su,
Julio Neves <=
- Re: [shell-script] su, Julio Neves, 2001/09/06
- Sobre Dialog, FiremanX Cathedrallabs, 2001/09/06
- Re: su, lucio . cunha, 2001/09/06
- Re: su, lucio . cunha, 2001/09/06
- Re: [shell-script] su, Eliphas Levy Theodoro, 2001/09/06
- Re: [shell-script] su, Daniel Chicayban, 2001/09/06