System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

User name restrictions in Linux

 
Pattabhi
Frequent Advisor

User name restrictions in Linux

Howdy Guys,

IS there a way to create a username with more than 8 characters in Linux? if i do it editing the password file, then i am not able to chnage the password for the user. let me know if there is a work aroung for this know issue.
8 REPLIES
TY 007
Honored Contributor

Re: User name restrictions in Linux

Hello Pattabhi,

Red Hat Enterprise Linux 4 OS:

# getconf LOGIN_NAME_MAX --> 256

# useradd abcdefghijk

# more /etc/passwd

Thanks
TY 007
Honored Contributor

Re: User name restrictions in Linux

Hello Pattabhi,

Further Testing.

# usermod -l lmnopqrstu abcdefghijk

# id lmnopqrstu
uid=501(lmnopqrstu) gid=501(abcdefghijk) groups=501(abcdefghijk)

# more /etc/passwd

Thanks
Pattabhi
Frequent Advisor

Re: User name restrictions in Linux

Thanks,

But, the problem is

#getconf LOGIN_NAME_MAX
256

#cat /etc/passwd | grep pattabhiraman
pattabhiraman:x:30105:501::/data/u01/apps/db2:/bin/bash

When i try to login, it does not let me in..

login as: pattabhiraman
pattabhiraman@inharley's password:
Access denied
pattabhiraman@inharley's password:
Access denied
pattabhiraman@inharley's password:

if i reduce the username to within 8 charaters, it lets me in.

TY 007
Honored Contributor

Re: User name restrictions in Linux

Hi Pattabhi,

Using 'ssh' to test connect to the server, no issue

login as: lmnopqrstu
lmnopqrstu@demo's password:
[lmnopqrstu@demo ~]$

Thanks
TY 007
Honored Contributor

Re: User name restrictions in Linux

Hello Pattabhi,

# rpm -qa | grep util-linux
# rpm -qa | grep passwd
# rpm -qa | grep openssh-server

You may want to check from the Linux Vendor Site whether above RPM Packages is the Latest Release.

Thanks
dirk dierickx
Honored Contributor

Re: User name restrictions in Linux

first time i hear of this problem. i can't remember even when there was an 8 char limit on the user names.
Mark Ellzey
Valued Contributor

Re: User name restrictions in Linux

Pattabhi,

Creating a user on my stock Fedora7 system with more than 8 characters works fine. But I have to ask: Why would you want to? What happens if you have to port these users over to another versions of Linux/Unix which restricts the username to 8 characters (which is the UNIX standard, by the way)? What happens then?

I guess if you will *NEVER* *EVER* use another OS then you'll be ok, but I've learned over my career to always expect the unexpected. This means planning for the most restrictive environment. I'd hate to be the one to have to change the username's for a 1000 (or larger) user system when management decided to go with a different OS which supports only 8 username characters.

Just thinking out loud...

Mark
Pattabhi
Frequent Advisor

Re: User name restrictions in Linux

Thanks Mark..

We have a special request and are trying to repro a customer scenario, thats why this rquest. I will try to get this repro set up on a non-linux platform

Regards,
Pattabh Raman