- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Switching to other users without supplying pas...
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
05-16-2004 07:59 PM
05-16-2004 07:59 PM
Switching to other users without supplying password
I have a question here. If I were to switch to other users without supplying password, can I still use the su command? If I'm not able to perform that using su, what are the ways that I can use to fulfill my need? Thanks
Cheers,
Khian Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:04 PM
05-16-2004 08:04 PM
Re: Switching to other users without supplying password
root doesn't need to provide password in order to log or issue a command as another user.
If you need to do various task, use this kind of syntax :
su - user -c "command"
su - user2 -c "other_command"
Cheers
Nicolas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:08 PM
05-16-2004 08:08 PM
Re: Switching to other users without supplying password
Regards
Khian Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:22 PM
05-16-2004 08:22 PM
Re: Switching to other users without supplying password
1) If all users have something in commun, have you consider using group privilege ? That's the most natural way to do it.
2) If you still want to log without password, use rsh with .rhost or ssh with a null passphrase against localhost.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:25 PM
05-16-2004 08:25 PM
Re: Switching to other users without supplying password
use the .rhosts facility, and su will no not ask any password
.rhosts file of the user you want to be :
servernanme username_who_login
Johan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:27 PM
05-16-2004 08:27 PM
Re: Switching to other users without supplying password
Using rhosts facility, I thought that is only implemented if you are accessing different nodes? U mean u can use it within the same node?
Regards
Khian Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:34 PM
05-16-2004 08:34 PM
Re: Switching to other users without supplying password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-16-2004 08:37 PM
05-16-2004 08:37 PM
Re: Switching to other users without supplying password
About your last reply, I dont know about su but it works for rlogin:
rlogin
About you su problem I would recommend you to use su:
You can get sudo from:
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.6.7p5/
or the main sudo site if you wish to get the latest version or compile yourself:
http://www.courtesan.com/sudo/
It does exactly what you wish (that is if you give the good option NOPASSWD... read the man pages and look at the samples)
Good luck
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 09:30 PM
05-18-2004 09:30 PM
Re: Switching to other users without supplying password
I have another restriction, that is due to security reasons, I will not be able to use the .rhosts file. So does that mean that sudo is the only way out here?
Thanks
Khian Wei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-18-2004 11:22 PM
05-18-2004 11:22 PM
Re: Switching to other users without supplying password
youruser ALL = (targetuser) /usr/bin/ksh
you can become the other user with the command
sudo -u targetuser /usr/bin/ksh