On Wed, Mar 05, 2025 at 09:46:53AM +0100, Marc Haber wrote: > this is a discussion with Vincent Lefevre on #1099470: > >1. For a system account, there would still be an issue if the account↲ > >has a password (if possible). If EXISTING_ID_MISMATCH is set, this↲ > >would also yield an issue; I think that this is possible if the --uid↲ > >adduser option is used, with an id different from the current one for↲ > >this account. You should add a test for this case.↲ > >↲ > >2. For a non-system account, the problematic test would always be↲ > >false, while it is actually meant to be true (the error message↲ > >contains "but is not a system user"). So you should add a test↲ > >↲ > > adduser --system username↲ > >↲ > >where the username account already exists and is not a system account↲ > >(not sure whether other options, such as --disabled-password, may be↲ > >needed). One would expect a non-zero exit status because --system is↲ > >used while username exists and is not a system account.↲
So that would bascially mean: (1) adduser foo adduser --system (must fail, 'already exists as a non-system user') (2) adduser --uid 100 foo adduser --uid 101 foo (must fail, 'cannot fulfill uid requirement, already exists with othe uid') (we would need to use --disabled-password for all non-system user creation since adduser cannot non-interactively create an account with a password). With EXISTING_LOCKED test being completely gone for trixie¹, do you suggest adding more tests for adduser in trixie? Greetings Marc ¹ we still define the value but neither set nor use it