1830503 Members
2591 Online
110006 Solutions
New Discussion

su problem

 
SOLVED
Go to solution
uadm26
Super Advisor

su problem

Hi,

I have a user backora and i need that user do su - oracle without asking for password. can you help?
Thanks.
7 REPLIES 7
Rajeev Tyagi
Valued Contributor

Re: su problem

Joel,

You can use sudo to do that.
Pete Randall
Outstanding Contributor
Solution

Re: su problem

Joel,

Yes, sudo is your answer:

http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p6/


Pete

Pete
uadm26
Super Advisor

Re: su problem

How Rajeev
RAC_1
Honored Contributor

Re: su problem

Install sudo and then set sudoers file (with visudo command)

backora (oracle) ALL= NOPASSWD "su - oracle"

Check man page for details.
There is no substitute to HARDWORK
TheJuiceman
Super Advisor

Re: su problem

If your company frowns on third party software on your system (like mine does), then you can also use restricted-SAM for this. Set backora up so that they are a SAM user (this can be done by running sam -r as root and then adding their ID in as instructed). Then create a Custom App that will execute "su - oracle" as root. Save the profile so that only her ID can run this script. When backora logs in and executes SAM, they can run the new script and it will su them as oracle without needing a password. When they exit out of "oracle", they will return to SAM as their own login.
Doing a "man sam" can help more.

Bob

TheJuiceman
Super Advisor

Re: su problem

PS - You could also use Service Control Manager also (but it is not built in to your system...you will have to get it from HP). Then backora could login as oracle from the command line without using a password.
Mic V.
Esteemed Contributor

Re: su problem

If you're running an automated ("lights-out") backup script, you could add it to root's crontab (it wouldn't need a password:

0 9 * * 1 /bin/su - oracle -c "runbackupscript.sh"

(Check the syntax)

Mic
What kind of a name is 'Wolverine'?