[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [shell-script] su

From: Lucio Rene Souza Cunha
Subject: Re: [shell-script] su
Date: Thu, 06 Sep 2001 14:56:44 -0300
User-agent: Mozilla/5.0 (X11; U; Linux 2.2.19pre17 i586; en-US; m18) Gecko/20001103

legal a ideia do default shell para determinado usuario, mas existe alguma maneira de passar a senha pela linha de comando ? ou do shell no su ?


Julio Neves wrote:

Favor responder a address@hidden
Para:   address@hidden
Assunto:        [shell-script] su

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?.
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,

Sair da lista: address@hidden
Banco Dados:

Seu uso do Yahoo! Grupos é sujeito aos Termos do Serviço Yahoo! <>.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]