Bug#400683: [Pkg-shadow-devel] Bug#400683: passwd: useradd creates users with spaces in usernames

Christian Perrier bubulle at debian.org
Tue Nov 28 16:58:26 UTC 2006


> paulv at malloc [08:47 AM] [0] ~$ sudo useradd " foo"
> paulv at malloc [08:47 AM] [0] ~$ sudo userdel " foo"
> userdel: user  foo does not exist

*that* could be considered a bug but another one...Either one in
useradd because it allows creating users with leading spaces in their
usernames....or one in userdel for not being able to remove such users..:)

> paulv at malloc [08:47 AM] [0] ~$ tail -1 /etc/passwd
>  foo:x:1007:100::/home/ foo:
> 
> > "useradd" is a low level utility provided along with the upstream
> > source code and having it more permissive than the Debian-specific
> > high-level utility named "adduser" seems OK to me.
> 
> I can't, unfortunately, switch to adduser. The problem I have is
> admittedly unusual. I have a big (150+ terminals) LTSP deployment, and
> we're using libpam-ncp to do authentication against a Novell server. If
> the users haven't logged in to the Linux machines before, libpam-ncp
> will automatically create an account for them, and it calls useradd to
> do it. The spaces end up causing all kinds of problems for me.


Sure, but then what do you expect us to do? If support for usernames
with spaces is removed, your autocreation script will fail
anyway. Seems that the only solllution for you is avoiding spaces in
usernmaes in the Novell server or hack your user creation scripts to
replace spaces by underscores.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-shadow-devel/attachments/20061128/943a8318/attachment.pgp


More information about the Pkg-shadow-devel mailing list