- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: su - username -c command_name
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
02-06-2002 10:41 PM
02-06-2002 10:41 PM
su - username -c command_name
I am running HP-UX 11 and on my machine the above does not work.
This is what I did
su - oracle -c dbstart and su - oracle -c ls
All that the above did was to switch-user to oracle. The command were never executed.
Please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 11:10 PM
02-06-2002 11:10 PM
Re: su - username -c command_name
For me it work (HP-UX 11.0)
Does switch to other new created user work ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2002 11:20 PM
02-06-2002 11:20 PM
Re: su - username -c command_name
Check if this shell can be called with "-c command".
Check if there are any errors during starting up the shell-environment for your user "oracle".
May be you need to check "man security".
Hardy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 12:22 AM
02-07-2002 12:22 AM
Re: su - username -c command_name
Check your .profile for something like
exec sh
A fork to a new level will mean no command
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 12:51 AM
02-07-2002 12:51 AM
Re: su - username -c command_name
First of all, which account you use to run this command? root? or superusers? If not, maybe you can not su to other accounts without password.
Second, what error messages you've got while running this command? Please post the error messages so that we can trace your problem.
Regards,
Kenny.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 01:38 AM
02-07-2002 01:38 AM
Re: su - username -c command_name
try "su oracel -c ls" (without minus).
It doesn't read the .profile.
Hope it helps.
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 05:41 AM
02-07-2002 05:41 AM
Re: su - username -c command_name
Try this,
su - user_name -c "type your command here"
Hope this helps.
Regds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-07-2002 06:02 AM
02-07-2002 06:02 AM
Re: su - username -c command_name
I'm doing something similar right now. You will probably have to do as Robert suggested and use
su oracle instead of su - oracle
so it doesn't read the profile. If it still gives you problems, create a script with the oracle user's environment variables in it with the dbstart command after, and then run this from the command line. Something like
su oracle -c myscript.sh
Let us know how it works.
Tim