- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- issues with usernames longer than 8 characters.
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
01-08-2008 07:50 AM
01-08-2008 07:50 AM
I noticed that whenever there's a username longer than 8 characters, programs like `who`,`w`,`ps` have problems displaying it. In particular:
`w` and `who` display just the first 8 characters, while `ps` displays the uid for these users instead of their username.
Does anyone know whether it's possible to overcome this limit?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 08:02 AM
01-08-2008 08:02 AM
Re: issues with usernames longer than 8 characters.
PS_FORMAT="user:15,pid,%cpu,%mem,vsz,rss,tty,stat,start,time,command"
Then run "ps ax"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 08:17 AM
01-08-2008 08:17 AM
Re: issues with usernames longer than 8 characters.
But this doesn't help me. Whenever there's a long username - `ps` simply replaces it with the respective UID.
Basically I have the workaround of executing `ps` with some options to get the UIDs of all users instead of their names and then to go over the list with some basic script to match the UID to the username, but I wonder if there's a solution for it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2008 09:41 AM
01-08-2008 09:41 AM
Re: issues with usernames longer than 8 characters.
With that format, long username should be displayed.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2008 06:21 AM
01-09-2008 06:21 AM
Re: issues with usernames longer than 8 characters.
PID TTY STAT TIME COMMAND.
Never the less, the command:
`ps axo user:15,cmd`
shows even the long usernames on my systems (rhel 4).
Do you have any idea if there's something to do with the `w` command and the fact that it shows only 8 characters? I use the output from `w` in scripts...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2008 09:20 AM
01-09-2008 09:20 AM
Solution(Actually you could do a horrible hack to the binary. But what kind of sick mind would even think of something like that. ;-)
sed -e 's/9\.8/016/g' < /usr/bin/w > w
chmod +x w
./w