GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- su -m <user> passwordless?
Operating System - HP-UX
1845515
Members
2442
Online
110244
Solutions
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Forums
Categories
This widget could not be displayed.
Company
This widget could not be displayed.
Local Language
This widget could not be displayed.
back
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
back
This widget could not be displayed.
This widget could not be displayed.
This widget could not be displayed.
Blogs
Information
This widget could not be displayed.
This widget could not be displayed.
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.This widget could not be displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2011 02:04 PM
03-24-2011 02:04 PM
Hi!
I have a script which prompts for password for a non-root user, can I avoid that?
su -m
Prompts for a password.
Its a startup script and the start up fails?
How can I fix this?
Thanks.
I have a script which prompts for password for a non-root user, can I avoid that?
su -m
Prompts for a password.
Its a startup script and the start up fails?
How can I fix this?
Thanks.
Solved! Go to Solution.
- Tags:
- su
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2011 02:10 PM
03-24-2011 02:10 PM
Solution
Hi:
Startup scripts are run as the 'root' user and thus you can launch *your* script from within the startup wrapper with:
su - someuser -c '/usr/local/bin/someuser.sh'
If a non-root process attempts to do a 'su' an interactive password prompt will be offered. You can't defeat this with redirection. In that case, your best recourse is probably to use 'expect':
http://en.wikipedia.org/wiki/Expect
Regards!
...JRF...
Startup scripts are run as the 'root' user and thus you can launch *your* script from within the startup wrapper with:
su - someuser -c '/usr/local/bin/someuser.sh'
If a non-root process attempts to do a 'su' an interactive password prompt will be offered. You can't defeat this with redirection. In that case, your best recourse is probably to use 'expect':
http://en.wikipedia.org/wiki/Expect
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-24-2011 02:31 PM
03-24-2011 02:31 PM
Re: su -m <user> passwordless?
Thanks!
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2026 Hewlett Packard Enterprise Development LP