Link to home
Start Free TrialLog in
Avatar of lxmilen
lxmilen

asked on

User name and password length

Is it possible on Linux Slackware, length of user name be more then 8 chars?
Avatar of bjornh
bjornh
Flag of Netherlands image

Yes, this should work without problems.
Avatar of alexbik
alexbik

Bjorn is right, it _should_ work.

Why did you reject his answer?

Alex.
Avatar of lxmilen

ASKER

On my Linux box user name length and password length
can't be more than 8 chars.I'm using Slackware 3.3.0
with kernel 2.0.35.When I'm trying to add a user
with user name length more than 8 chars, system responds
"invalid user name".
I am using Slackware as well.. here is the method I use... let me know if it works for you and I will repost as an answer.

Add the user with an 8 character username and then modify you /etc/passwd* and /etc/shadow* files changing all occurances of the 8 character user name to the longer user name.  You may or may not want to rename the home directory if you do.. make sure you change it in the password files and then you can use:
mv /home/8charusr /home/morethen8charusr
You will want to add second user with the same 8char base to see if /bin/login will distinguish a difference :)
Their is a configuration file that has to modified in order to allow more than eight characters in length in the login and password.  I do not know the configuration file for slackware.  For those personnel that have more than eight characters in the login and password length try this,  login using the login id that is shown in you password file ie........  bryanjones (10 char) and password xxxxxxxxxx (10 char) and it will let you in correct,  now this;  try bryanjon ( 8 char) password xxxxxxxx ( 8 char) < the first 8 char of your password> this also should allow you to login if not then use the full login name and just the first eight characters of the password ( this should allow you to login) if not then slackware is god on security without certian configurations.
search for  PASS_MAX_LEN, PASS_MIN_LEN
usually in /etc/login.defs

You always may specify a longer username in /etc/passwd directly, as bryanjones said.
Avatar of lxmilen

ASKER

Thanks everyone!
With modifying /etc/passwd and /etc/shadow files, I'm
able to create users with 8 chars length of user name.
/bin/login makes difference between users with equal
first eight chars.
Congratulations... would you consider my remarks as a vaild answer?  If so please let me know so that I may post as `Answer' and get my points.

Good luck in all your Linux ventures!
`Damn strait it's Linux'
- My page at http://www.greb.tj (image lower left hand corner)
  borrowed from somewhere
Avatar of lxmilen

ASKER

Yes, i consider mikeqrb's remarks as a valid answer.
Thanks a lot again.

With allowing people to have usernames with more than 8 chars,
thare is no need to make virtual user in Sendmail, for every
person who wants his left hand side of e-mail address, contain
more than 8 chars. It's a good way to reduce length of
my virtusertable and genericstable.

Just a little note: you won't login via telnet to an account longer than 8 chars.
ASKER CERTIFIED SOLUTION
Avatar of mikegrb
mikegrb

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of lxmilen

ASKER

In my case it works via telnet.