- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: "who am i" and "logname" commands not working ...
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
09-08-2008 06:21 AM
09-08-2008 06:21 AM
"who am i" and "logname" commands not working with sudosh
The "clearenvironment" paramater in sudosh is normally set to "yes" so we tried "no" and this didn't help.
Just curious if anyone else has run into this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2008 06:39 AM
09-08-2008 06:39 AM
Re: "who am i" and "logname" commands not working with sudosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2008 06:59 AM
09-08-2008 06:59 AM
Re: "who am i" and "logname" commands not working with sudosh
"logname" returns:
logname could not get login name
Note that "whoami" works but not "who am i".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2008 07:01 AM
09-08-2008 07:01 AM
Re: "who am i" and "logname" commands not working with sudosh
sudo should have no impact on these commands to root user.
Do you have setup involving these two commands for non-root users?
To help, I'd need to see snippets from your sudoers file.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2008 07:17 AM
09-08-2008 07:17 AM
Re: "who am i" and "logname" commands not working with sudosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2008 10:23 PM
09-08-2008 10:23 PM
Re: "who am i" and "logname" commands not working with sudosh
>"logname" returns: logname could not get login name
Perhaps sudosh doesn't change the real and effective users to the new user?
whoami(1) returns the effective user.
logname(1) and who(1) probably get their info from getlogin(3) which seems to
look at utmpd. Perhaps utmpd doesn't have the info?
(And logname(1) does error checking.)