cancel
Showing results for 
Search instead for 
Did you mean: 

USRID Length

SOLVED
Go to solution
MSwift
Regular Advisor

USRID Length

Greetings!

Is there a userid length limit on Linux? Version Redhat 5..In case i need to have more than 8 chars as userid what are the extra steps i have to be prepared?

Thanks

Mike.
2 REPLIES
sarfaraj ahmad
Trusted Contributor
Solution

Re: USRID Length

Hi,

There are three types of users in Linux,
1.root user (admin --- 0)
2.System users ( 1 to 499 )
3.Normal users ( from 500 to 59999)

when u want to assign below 500 id first check in /etc/passwd file which id is free( not assigned to any user) u can use that id and u can assign. Assume 356 id is free
EX: #useradd -u 356 tom
system will give u error but the user has created successfully.
Now check the /etc/passwd file u will get tom
user entry with uid 356 ok?

you can use 8 character user id with -u switch if that is not assigned yet, no extra steps required.
for detail in user administration, please follow the below link for your reference.

http://www.debianadmin.com/users-and-groups-administration-in-linux.html

NOTE: you can change user id limit in /etc/login.defs file.

Hope this will help you to clear your doubts.
Cheers.
Matti_Kurkela
Honored Contributor

Re: USRID Length

All modern Linux kernels can handle longer usernames, but some tools (ps for example) have only 8-character space for usernames in their standard listing. If the username is longer than 8 characters, ps shows the UID number instead, so the listing remains un-ambiguous.

ps can show longer usernames if you use options to specify a custom list format.

MK
MK