Bugzilla – Bug 118371
manage username starting with digit 0 from Yast2
Last modified: 2005-09-29 14:42:07 UTC
When you modify CHARACTER_CLASS in /etc/login.defs to allow username starting with number digit, strange behavior appen if username it start with digit 0. If you add a username 012345 it works only first time when you create it (in the Suse 9.2 it never works). When you reopen Yast->Security and Users->Edit and Create users, your username 012345 is changed to 5349 (n.b. octal number 012345 is 5349 decimal), and if you change some properties username is changed in /etc/passwd.
Jirka, Roberto also wrote me that he was able to work around it by hacking ycp.pm: elsif ($reftype eq "HASH") { print "\$["; while (my ($key, $value) = each %$val) { Return ($key, $quote_everything); print ":"; # just to test if ($key eq "uid") { print WriteYcpString($value); } else { Return ($value, $quote_everything); } print ","; # trailing comma is allowed } print "] "; # no "]:" }
Martin, the "conversion" (to octal number) is done on the way from agent (here ag_passwd) to yast (Users.pm). It looks like I can't handle it from my code...
short test shows that ycp::Return (\%myhash, 1); could work and yast2-users is able to read all the data (including integers) correctly. However proper testing would be necessary.
I agree with Jiri that problem is in ag_passwd; if I use ycp::Return(\%myhash, 1), the second parameter (1) tell to ycp::Return routine to handle every values in the hash '%myhash' quoted as a string. File ag_passwd probably need to be changed starting from line 646 (ycp::Return (\%{$users{"local"}}) ) adding the second parameter to quote values almost for hashes users, shadow and groups (local and system). We should verify if uidnumbers quoted (i.e. '12345') is a problem to the modules that are using ag_passwd.
done in yast2-pam-2.13.0