username rules

I am new to opensuse and running into a problem. I need to change the rule for username where it will allos numbers to start the username. risht now I get an error when adding a username that starts with a number. Is there a place to change this rule?

BTW am NON-Technical :wink:

Using opensuse 12.1 looked in YaST for** User and Group Administration**, opened create a new user, then from the Help read :

Create the Username from components of the full name by clicking Suggestion. It may be modified, but use only letters (no accented characters), digits, and ._-. Do not use uppercase letters in this entry unless you know what you are doing. Usernames have stricter restrictions than passwords. You can redefine the restrictions in the /etc/login.defs file. Read its man page for information.

Try change (Login) username so excludes numbers, after created username then try the numbers within User’s Full Name as there may be acceptable.

I am using Opensuse 11. The opensuse 12 will not load on my xenserver box - it chokes on the network adapters. I see this is similar under the help on user management screen but tried to update the login.defs file and continue to get same error that username is invalid - can not start with a number. trying to add a username like 360group or 2fortheroad fails. This is an automated add through a php program using ldap for email addresses and I would like to still have the ability for users to create email addresses with syntax such as this.

Am NON-Technical {:slight_smile:

Yes, trying to add username= 360group failed with the error, while username= _360group created OK.

Text for restrictions viewed using terminal command ** cat /etc/login.defs **


#
# User/group names must match the following regex expression.
# The default is [A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\?,
# but be aware that the result could depend on the locale settings.
#
#CHARACTER_CLASS        [A-Za-z_][A-Za-z0-9_.-]*[A-Za-z0-9_.$-]\?
CHARACTER_CLASS    [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_][ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-]*[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.$-]\?

#

As CHARACTER_CLASS excludes using numbers as first character, best wait for wiser technical types to explain risks/complications, with hopefully a work-around to reduce potential problems.

IMHO perhaps relocate topic to forum : Network/Internet

.

On 11/03/2012 06:36 AM, arccomp wrote:
> Is there a place to change this rule?

this question usually comes from one struggling to support a mixed
environment network…see, it is a trick…an evil trick…long before
MS had a network capable OS (their first was Win3.11 in 1992) all the
Unix in the world (and maybe others too) had a rule about usernames that
didn’t allow people’s names on the network to begin with a number! i
mean, if your company had three Freds they couldn’t be
1fred
2fred
3fred

because then they wouldn’t fall in the list of other folks like they should:

alice
betty
carl
david
earl
frank
frances
fucia
greg

instead it made more sense to line them up

alice
betty
carl
david
earl
fred1
fred2
fred3…
frank
frances
fucia
greg

but, in the '90s alone comes MS with the desire to take over the world
and not work easily with anyone else, so they just made their systems
expect numbers first…

doing so, makes it as difficult as possible to not have MS in the
front office AND the back office…

there is a way around the attempted MS roadblock…i don’t remember
it…but i guess it is somewhere in the Samba info, maybe here
http://opensuse.swerdna.org/


dd

IMHO you should be very, very carefull to go for usernames starting with a digit. Even when you succeed in the first place, you should be aware that other software may fail on this very unusual construction.

You may see it as a bug, but that will not help you when some software reckons that something is a userid instead of a username because it starts with a digit. :frowning:

Thanks so far for the feedback. It would save me hours of time to find a workaround or a way to eliminate this rule. I appreciate the words of caution and warning - it is a single use VM for managing ldap. just need to allow the use of numbers at the start of the username. Any other ideas / solutions out there?

Like @hcvv I think you may succeed in getting usernames to start with a digit, but IMHO it’s likely that you run into trouble when it’s done. If php is involved, you could think of some conversion mechanism

On 2012-11-03 07:46, arccomp wrote:
> using
> ldap for email addresses

So what you want really is mail addresses? Use virtual addresses, not
real users.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On 2012-11-03 07:46, arccomp wrote:
>
> I am using Opensuse 11. The opensuse 12 will not load on my xenserver

There is no such thing as openSUSE 11 nor 12. Are you perchance using
SLES? They have such versions, and use a different forum.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

because I did not use 11.4 and 12.2? It is opensuse. I appreciate anyone who can Help to respond.

email is being handled as a user through ldap and cyrus

More info on virtual addresses vs. real users? I have a php app that adds the users off a form from another box to the ldap on this box. The username shows up in the list when it starts with a number, but will not activate. I am assuming because it violates the rule.

On 2012-11-03 19:46, arccomp wrote:

> More info on virtual addresses vs. real users?

If you install a product like SLES, it comes integrated, I understand.
If you want to do it in openSUSE, you have to read around (and probably
do your setup from scratch). I can offer no help in changing the rules
for Linux usernames, but mail users are different.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

On 2012-11-03 19:36, arccomp wrote:
>
> because I did not use 11.4 and 12.2? It is opensuse. I appreciate
> anyone who can Help to respond.

There are no major.minor numbers in openSUSE, 11.4 is vastly different
than 12.1, and 12.1 different than 12.2. There is no generic 11 or 12.
You have to say what exact version you have.


Cheers / Saludos,

Carlos E. R.
(from 11.4 x86_64 “Celadon” (Minas Tirith))

I ***love ***when posts go sideways because of things like this. The 12.2 comment was that I could not install it on my xenserver box. This is not related to this problem and hindsight is that I should not have included that data in my post because it has sidetracked from the solution.

Problem: I have opensuse 11.4 and need to allow a number in the first spot of the username.

Solution ?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

> Problem: I have opensuse 11.4 and need to allow a number in the
> first spot of the username.
>
> Solution ?

paulparker already gave you the solution in modifying the
/etc/login.defs file’s character class to match usernames. At least
from the command line that modification works. If Yast does not allow
it then you’ll need to bypass that.

Taking a step back, and possibly sidetracking this to a better location,
what is your desired end goal? If this is all about e-mail addresses
and users will never access the system directly then making the changes
as mentioned above is probably okay, but why bother when your e-mail
address and username don’t need to matter? If this is about something
more, like actually accessing the OpenSUSE system, please state as much
so perhaps we can find better options. Most end users don’t care much
about usernames, so long as they can get into the system (usernames and
passwords are necessarily evils to most end users). If you populate the
fullname field with what they expect to see (‘Fred Jones 1’, ‘1fred’, or
whatever else) then perhaps you don’t need to modify the system in
potentially-dangerous ways to have a good end result.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://www.enigmail.net/

iQIcBAEBAgAGBQJQlYeyAAoJEF+XTK08PnB5LpgP/Rjk19rjGnrMYzVTCDgAVQpI
nxq9uQ9rJ6cI6Imyyst/dHfYo2FPkWllsbMFltiM2rxod+hvLFo38/z7oJhsgnwo
XZ8dwXCGdXkSzXM3Q+TJEddXyG0G7JaKu08LAOfcLAsZkvtcB21TWgZ1lpdLtenh
ioDDmwBwR2Fg1uo9SPLeh8GaKbew2gglSPrT8cH5YkXRGQVVxG04p1RzjN8GJyj5
GeoI5nnky2//78JkgF4zyGvgBBnnLip0o0dree9eVapnXLiJGB645etSnaD88U81
gNKQAYVD7ezyze3HvHv6WmqE+Oup4eeeJzNY36LqpE0B7C4UnOYmCwKyoYp5iGff
Ga8d6JCN+sL3KiAF6FXz/4Uf3CVZ7v73S42dRIFgFcLGJDQAUhuxyvIBjm5HYF6n
7UospcpdcYerALbmICaVqYYXFDfCzBFYEGXUlYfJ5T1tmz5SmrW2GfxUkNJ10erv
BvDCFzIWLFZF1o6jSzEtq9kJ6ysQ3dSDQCsMj9+N9bN4yrGsqReKKskm66b0JbrT
kupk4ablr7On4zdY/G442G7xxYYu18A8HQTPtAwbzIJH7LliB3ubF0SMV06kAmfQ
NX7dmE8YzqXF3mqD1RPUKvQ4ZnvjFkK3z/MSlTDPOMuNUBnxnuzrpzah/DzuMxkf
Q+pZBut1hrqz01j/VfeG
=TNqG
-----END PGP SIGNATURE-----

This is just for email and not accessing the system. I updated the defs file and something in the system is kicking it back as not valid still and I cannot email to that account without it bouncing back.

More detailed advice required to help, eg :

(a) which email access program you attempt use fails ;

(b) which error messages you are seeing (if able copy and paste within a code box) ;

IF users can access their emails only using browsers a single GUEST user account may service all users, each user log in as GUEST with no/same password, then log into their email accounts with their email account identity, when finish log out, with /home/GUEST purged so clean for each new user.

I get the error in yast when I try to update or add. I need to do an update to the username which is properly added via a php form for the email to activate after that add. The usernames are being added to the ldap database and it is a manual step to add to the email group so that the username activates as an email address. If there is a set of line commands to accomplish this - I would use them - I am a newbie in the linux world and would appreciate any help on this. Frustrating because I have been maintaining windows server systems for years and can solve anything I need on that platform. entering the linux world has bee a nice challenge but I admit I need some help to work this through. Thanks to all who contribute toward the solution.