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
Sair da lista: address@hidden
Banco Dados: http://www.egroups.com/group/shell-script
Seu uso do Yahoo! Grupos é sujeito aos Termos do Serviço Yahoo!
<http://br.yahoo.com/info/utos.html>.