- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- su with 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
Discussions
Discussions
Forums
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
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-26-2009 09:34 PM
тАО05-26-2009 09:34 PM
su with password
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 09:43 PM
тАО05-26-2009 09:43 PM
Re: su with password
if you are super user root and will try to switch any other user it will not ask password , thanks,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 09:47 PM
тАО05-26-2009 09:47 PM
Re: su with password
A normal user can't do "su" without passwd. if you are super user then you can "su" switch user without passwd.
Suraj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 10:08 PM
тАО05-26-2009 10:08 PM
Re: su with password
A non-root user need password to do "su". But a root user can "su" switch user without passwd.
The following link may help you:
http://www.unix.com/unix-advanced-expert-users/95304-su-command-without-password-prompt-non-root-account.html
Rgds-Kranti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 10:14 PM
тАО05-26-2009 10:14 PM
Re: su with password
Ok, it's yet said user root can do what do you want.
Now, if you want an userA to do a su userB without or with a passwd in the command it's perhaps because you want an userA to launch a command or a script own by userB. If it's the case, it's better to see sudo command.
http://hpux.connect.org.uk/hppd/hpux/Sysadmin/sudo-1.7.1/
you could take it on the internet express cd too
http://h71019.www7.hp.com/hpux11i/cache/324414-0-0-0-121.html
If you want to make a script with su user and put the passwd, you could play also perhaps with the command expect.
Hope it helps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 10:20 PM
тАО05-26-2009 10:20 PM
Re: su with password
Dear zohair
as a security while trying other users for su
it should ask passwd
in root case it will not ask.
but if u want other user also u can make(by making userid 0) but it is wrong policy
every time other than root user should ask
passwd.
thanks and regards
Sajjad Sahir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 10:21 PM
тАО05-26-2009 10:21 PM
Re: su with password
There is no option to give password along with su command.How ever you can use sudo with NOPassword option
For sudo http://www.sudo.ws/sudo/download.html
If you have ssh installed on your server,then below method can be used for switching user with out password
for you have users called USERA and USERB on server TEST then
#su - USERA
#ssh-keygen -t rsa
it will create private and public keys under $HOME/.ssh/
#su - USERB
#mkdir .ssh
#cat /home/USERA/.ssh/id_rsa.pub >> /home/USERB/.ssh/authorized_keys
now you can login as USERB from the USERA@ localhost
USERA@TEST>$ ssh USERB@TEST
Johnson
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 10:33 PM
тАО05-26-2009 10:33 PM
Re: su with password
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 10:45 PM
тАО05-26-2009 10:45 PM
Re: su with password
Please assign the points
thanks and regards
Sajjad Sahir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-26-2009 11:25 PM
тАО05-26-2009 11:25 PM
Re: su with password
U shud assign points as we gave you solution by wasting our time...u shud respect this.
Rgds-Kranti