On 2025-03-03 23:26:17 +0100, Vincent Lefevre wrote: > BTW, the adduser code looks suspicious: > > my $ret = existing_user_status($new_name, $new_uid); > if ($ret == (EXISTING_FOUND|EXISTING_SYSTEM)) { > # a user with this name already exists; it's a problem when it's not > a system user > log_fatal( mtx("The user `%s' already exists, but is not a system > user. Exiting."), $new_name ); > exit( RET_WRONG_OBJECT_PROPERTIES ); > } > > Concerning the test $ret == (EXISTING_FOUND|EXISTING_SYSTEM), > if I understand correctly, if EXISTING_SYSTEM is set, this means > that this is a system user: in sub existing_user_status: > > $ret |= EXISTING_SYSTEM if \ > ($uid >= $config{"first_system_uid"} && $uid <= > $config{"last_system_uid"}); > > However, I still don't understand the difference between the > two machines.
Thanks the Michael Musenbrock, I now understand: on the other machine, the account is locked! Machine where I got the failure: # grep colord /etc/shadow colord:*:16714:0:99999:7::: (with /bin/false for the shell in /etc/passwd). Machine where the upgrade worked: # grep colord /etc/shadow colord:!:19637:::::: (with /usr/sbin/nologin for the shell in /etc/passwd). So, in short, the test has (at least) 2 bugs: 1. It reverses the meaning of EXISTING_SYSTEM. 2. It depends on the lock status of the account. Now, I don't understand why the account is not locked on the old machine and the account is locked on the more recent machine. A past bug of adduser? -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / Pascaline project (LIP, ENS-Lyon)