max user account on linux redhat 7.2

max user account on linux redhat 7.2

Post by Roberto Guernell » Wed, 20 Mar 2002 03:59:52



I need to change the max length of linux account (now it is setted to 8
character).
I've tried to modify the login.defs file but I've not found any
documentation.
Can someone help me?

Thanks and excuse me for my english.

Roberto Guernelli

 
 
 

max user account on linux redhat 7.2

Post by Davi » Wed, 20 Mar 2002 04:44:08



> I need to change the max length of linux account (now it is setted to 8
> character).
> I've tried to modify the login.defs file but I've not found any
> documentation.
> Can someone help me?

> Thanks and excuse me for my english.

> Roberto Guernelli

What is it you are trying to do exactly?
Make the password minimum length longer?

If that is what you are trying you can do it like this. I have heard it
can break things but haven't had any problems myself.

You "MUST" have MD5 passwords enabled for this to work.
To increase the password length you would:

     vi /etc/login.defs
     and change the line that reads:

PASS_MIN_LEN 5

Or you can make the "root" and "user" passwords different lengths with
this. Again you MUST have MD5 passwords enabled/

     vi /etc/login.defs
Comment out the existing  "PASS_MIN_LEN "  line. And add the following
lines directly below it.

   # PASS_MIN_LEN 5
PASS_MIN_LEN    if [ `id -un` = root ]; then
                                 PASS_MIN_LEN   15
                             else
                                 PASS_MIN_LEN   10
                           fi

In this example the "root" password would be set at 15 characters and
the "user" password at 10 characters.

Then  "chmod 600  /etc/login.defs"   when done so that other users can't
access it.

--
Confucius say: He who play in root, eventually kill tree.
Registered with the Linux Counter.  http://counter.li.org
ID # 123538

 
 
 

max user account on linux redhat 7.2

Post by Roberto Guernell » Wed, 20 Mar 2002 05:47:37


My account on my linux computer is "rg" but I would like it will be
"rguernelli".
During installation I've tried to put in "rguernelli", but system accept
only 8 character (or 7 I don't remenber well).
I hope to have been more clear.
Thanks and sorry for my English.

Roberto Guernelli

 
 
 

max user account on linux redhat 7.2

Post by Nico Kadel-Garci » Thu, 21 Mar 2002 10:25:01



Quote:> My account on my linux computer is "rg" but I would like it will be
> "rguernelli".
> During installation I've tried to put in "rguernelli", but system accept
> only 8 character (or 7 I don't remenber well).
> I hope to have been more clear.
> Thanks and sorry for my English.

> Roberto Guernelli

I'm not sure there is a solution. This is an *old* UNIX limitation: I'm not
sure Linux has gotten away from it.

Which Linux are you running?

 
 
 

max user account on linux redhat 7.2

Post by Adaptr » Thu, 21 Mar 2002 12:16:54



Quote:> My account on my linux computer is "rg" but I would like it will be
> "rguernelli".
> During installation I've tried to put in "rguernelli", but system accept
> only 8 character (or 7 I don't remenber well).
> I hope to have been more clear.
> Thanks and sorry for my English.

You're forgiven...

See, it is indeed 8 characters, and it's HARD-CODED into the useradd
program:

#define MAX_USRNAME 8    (somewhere along line 129 of adduser.c)

so Yes, in theory you could change this value and recompile the user and
group utilities, BUT :

HOW MANY tools and critical system parts RELY on this value being 8 or less
?

The problem is : nobody knows...It's been 8 characters since Dennis Ritchie
started twiddling around on the famous PDP-boxen (! :-) in the mid-1960's,
so it's probably a VERY bad idea to try and change it just because it looks
better..

But by all means - go ahead and we'll see what happens ;-)

 
 
 

max user account on linux redhat 7.2

Post by Earle Orenstei » Thu, 21 Mar 2002 19:01:02


A wonderful answer - thanx.



>> My account on my linux computer is "rg" but I would like it will be
>> "rguernelli".
>> During installation I've tried to put in "rguernelli", but system accept
>> only 8 character (or 7 I don't remenber well).
>> I hope to have been more clear.
>> Thanks and sorry for my English.

> You're forgiven...

> See, it is indeed 8 characters, and it's HARD-CODED into the useradd
> program:

> #define MAX_USRNAME 8    (somewhere along line 129 of adduser.c)

> so Yes, in theory you could change this value and recompile the user and
> group utilities, BUT :

> HOW MANY tools and critical system parts RELY on this value being 8 or less
> ?

> The problem is : nobody knows...It's been 8 characters since Dennis Ritchie
> started twiddling around on the famous PDP-boxen (! :-) in the mid-1960's,
> so it's probably a VERY bad idea to try and change it just because it looks
> better..

> But by all means - go ahead and we'll see what happens ;-)

 
 
 

max user account on linux redhat 7.2

Post by Dr. Joel M. Hoffm » Sat, 23 Mar 2002 04:44:18


Quote:>[re length of usernames]

>See, it is indeed 8 characters, and it's HARD-CODED into the useradd
>program:

>#define MAX_USRNAME 8    (somewhere along line 129 of adduser.c)

>so Yes, in theory you could change this value and recompile the user and
>group utilities, BUT :

>HOW MANY tools and critical system parts RELY on this value being 8 or less
>?

>The problem is : nobody knows...It's been 8 characters since Dennis Ritchie
>started twiddling around on the famous PDP-boxen (! :-) in the mid-1960's,
>so it's probably a VERY bad idea to try and change it just because it looks
>better..

>But by all means - go ahead and we'll see what happens ;-)

I have a user account with 9 characters, and the only problems I've
seen are minor esthetic ones, like "ls" only printing 8 chars during
"ls -l."