Link to home
Start Free TrialLog in
Avatar of snmurthy
snmurthy

asked on

Scipt file for a password.

Hi,

   Let's assume that there is a command that needs to be executed only by root. Is there a possibility that a script file can be used which will provide the password for the root. like :

su -c command
password : xxxxxxxx

this should happen without our entering the command.

is that possible? if yes how! and if no why?

-- Murthy.
Avatar of liormmm
liormmm

Read sudo manual. You can restrict some user to run a certain command with root privileges. You can customize it to ask for a password or not.

If you have it installed, try visudo and you will be editing sudo configuration file.

Hope it helps.
ASKER CERTIFIED SOLUTION
Avatar of cspangen
cspangen

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
in root there is no password at first u login as root and ther is no passwor and if u wana make a password then you type in :
passw
and type in ur password
snmurthy:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept comments from cspangen as answer
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheWeakestLink
EE Cleanup Volunteer