- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: su to oracle without password
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 11:40 PM
06-27-2005 11:40 PM
su to oracle without password
I want to su oracle as user A, but it prompts me password when I run in batch program. Can anyone suggest a way to do it, say granting privileges or permission ?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 11:54 PM
06-27-2005 11:54 PM
Re: su to oracle without password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 11:56 PM
06-27-2005 11:56 PM
Re: su to oracle without password
If your user is having root previlages or the job is run as root, you will be never prompted for passwd for any user.
Another option could be that you set UID on your batch program so that it is always executed with root previlages not causing the prompt.
Another way of executing this as root will be to use sudo.
HTH,
Devender
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2005 11:56 PM
06-27-2005 11:56 PM
Re: su to oracle without password
chown root:userAgroup /batchprogram
chmod u+s /batchprogram
Be aware that having setuid programs is considered a security risk.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 12:36 AM
06-28-2005 12:36 AM
Re: su to oracle without password
(
sleep 1;
printf "oracle\n";
sleep 2;
printf "
sleep 1
printf "/tmp/batchfile\n";
sleep 1
printf "exit";
) | telnet localhost
where /tmp/batchfile is with execution permission.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 12:49 AM
06-28-2005 12:49 AM
Re: su to oracle without password
Be carefull to check the folders chmod values
~oracle: 0755
~oracle/.ssh: 0700
~oracle/.ssh/authorized_keys: 0600
oracle# cd ~/.ssh
oracle# ln authorized_keys authorized_keys2
root# cat ~end_user/.ssh/id.pub >>~oracle/.ssh/authorized_keys
end_user# ssh oracle@localmachine your_command
No password needed
EŠjøÿ, Håve Fà à ¡ Ħ.MeŠıjŠ[ hav
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 01:14 AM
06-28-2005 01:14 AM
Re: su to oracle without password
if you want to really automate this process without granting privileges then you can do so by using 'expect' script.
check man page of expect to find more details on this.
Regards,
Gopi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-28-2005 09:08 PM
06-28-2005 09:08 PM
Re: su to oracle without password
You can also peek at the packages named `sudo` or `super` at http://hpux.its.tudelft.nl/. They are designed for this purpose.
However, the origional way to do this is to use the sticky-bit: `chmod u+s binary`. Details are explained in most unix adminsitrators books.