HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- su problem
Operating System - HP-UX
1834149
Members
2329
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2001 08:13 PM
08-06-2001 08:13 PM
When I submit the following command, I get this result.
# su - user -c "ls"
(c)Copyright 1983-1997 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
...
Technical Data and Computer Software clause in DFARS 252.227-7013.
Hewlett-Packard Company
...
forth in FAR 52.227-19(c)(1,2).
You have mail.
test1.txt test2.txt
test3.txt test4.txt
logout
#
How can I run the command so that I will not get the license, copyright message?
Thanks.
# su - user -c "ls"
(c)Copyright 1983-1997 Hewlett-Packard Co., All Rights Reserved.
(c)Copyright 1979, 1980, 1983, 1985-1993 The Regents of the Univ. of California
...
Technical Data and Computer Software clause in DFARS 252.227-7013.
Hewlett-Packard Company
...
forth in FAR 52.227-19(c)(1,2).
You have mail.
test1.txt test2.txt
test3.txt test4.txt
logout
#
How can I run the command so that I will not get the license, copyright message?
Thanks.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2001 08:30 PM
08-06-2001 08:30 PM
Re: su problem
su user -c "ls"
can do it.
Hi Friend
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2001 08:31 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-06-2001 08:58 PM
08-06-2001 08:58 PM
Re: su problem
Hello
su user -c "ls"
will work for the ls command but if you read the man pages for the command su it will tell you that without the - you will become user while retaining the previously exported environment. By doing
su - user -c "ls"
It says you become user but change the environment to what would be expected if the user had originally logged in.And will execute command and its arguments using the temporary environment and permissions of user. This is why the - option is important when you do an su for the user root. Because the non root user would not have permissions to execute a root command.
You can always do an su -d user
wich will promt you for a password but not give you the login style promts. And you will stay logged in as that user until you exit out of that user name. I suggest the best way would be to do what Michael recommends
Richard
su user -c "ls"
will work for the ls command but if you read the man pages for the command su it will tell you that without the - you will become user while retaining the previously exported environment. By doing
su - user -c "ls"
It says you become user but change the environment to what would be expected if the user had originally logged in.And will execute command and its arguments using the temporary environment and permissions of user. This is why the - option is important when you do an su for the user root. Because the non root user would not have permissions to execute a root command.
You can always do an su -d user
wich will promt you for a password but not give you the login style promts. And you will stay logged in as that user until you exit out of that user name. I suggest the best way would be to do what Michael recommends
Richard
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 2025 Hewlett Packard Enterprise Development LP