On Mon 17 Sep 2007, Peter Nixon wrote: > Hi Guys > > I have spent several days porting a system across from an old Debian > server to a shiny new openSUSE 10.2 machine including moving thousands of > user accounts and home dirs. I was just about to put the new system into > production and found that our provisioning scripts fail to create new > users with the following error: > > # useradd 00c002f8dfe9 > useradd: Invalid account name `00c002f8dfe9'. > > I dug a little deeper and found the following in the man page for SUSE's > version of useradd: > > "The account name must begin with an alphabetic character and the > rest of the string should be from the POSIX portable character class > ([A-Za-z_] [A-Za-z0-9_-.]*[A-Za-z0-9_-.$])." > > Now, I am sure this is correct POSIX behaviour, but the fact is I have a > working Debian system and a non working SUSE system with no chance to > change the way our accounts are created. They ALL start with a number > (because they are based on MAC addresses) and we have field deployed > software using this system which would take months to update. > > How can I turn off this account name check on SUSE?
For future reference the answer is to edit /etc/login.defs and change: CHARACTER_CLASS [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_] [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-]*[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_. $-]\? to CHARACTER_CLASS [ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-]*[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_. $-]\? ie. delete the first regexp block. Thanks to Henne for the correct answer and to Andreas and Thorsten (albeit after I had solved the problem) who both pointed me in the direction of the correct man page. Cheers -- Peter Nixon http://peternixon.net/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
