- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to su a user id 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
10-03-2006 07:51 PM
10-03-2006 07:51 PM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2006 08:39 PM
10-03-2006 08:39 PM
Solutionsudo would be my answer.
Please see thread:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=80250
But the link is old ! New link to:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.8p9/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2006 08:42 PM
10-03-2006 08:42 PM
Re: how to su a user id without password
1. Use sudo. When user2 su to user1, system will ask for password of user2 but not user1.
2. Easy but "dirty". Create .rhosts file in user1's home dir. In .rhosts file put
hostname user2
hostname user3
hostname user4
When user2, 3, 4 ... do a rlogin hostname -l user1. The system will log user2 in with password challenge
Yang
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-03-2006 08:51 PM
10-03-2006 08:51 PM
Re: how to su a user id without password
Just for information, in sudo, there is an option NOPASSWD...
How would batches work otherwise...
So it is your best choice
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-04-2006 01:43 AM
10-04-2006 01:43 AM
Re: how to su a user id without password
Sudo is probably the quickest/easiest solution. Another possiblity is to use ssh w/Public Key authentication.
Each user generates their ssh key paris, adds the public key to the ~${user1}/.ssh/authorized_keys file.
From there the authorized users would be able to "ssh -l ${user1} [localhost|$host]" to get a shell or ssh -l ${user1} [localhost|$host] ${command} to execute commands.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2006 01:00 AM
10-05-2006 01:00 AM
Re: how to su a user id without password
1. you can use ssh and use the authorized keys to allow the user.
2. you can use sudo with NOPASSWD option for that user.
Please do not use .rhost file, there is security risk. Given a choice I would be using sudo.
Thanks
Pratyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-05-2006 01:30 AM
10-05-2006 01:30 AM
Re: how to su a user id without password
>>Please do not use .rhost file, there is security risk. Given a choice I would be using sudo.
I've always considered the NOPASSWD option to sudo to be as big, if not bigger security hole as the ~/.rhosts files.
If you need batch processing which requires running commands as another user, your best option is ssh with public key authentication. Sudo is easier to connfigure, but is significantly less secure if you're using the NOPASSWD option.
Assuming you don't need batch processing, sudo is probably your best/easiest solution.
HTH;
Doug
------
Senior UNIX Admin
O'Leary Computers Inc
linkedin: http://www.linkedin.com/dkoleary
Resume: http://www.olearycomputers.com/resume.html