Bug#317012: Bug#328090: [Pkg-shadow-devel] Bug#317012: fixed in shadow 1:4.0.3-37

Christian Perrier bubulle at debian.org
Fri Sep 23 08:08:36 UTC 2005


Quoting Petter Reinholdtsen (pere at hungry.com):
> [Christian Perrier]
> > Well, Petter, could you give us details about the environment where
> > you got the failure ?
> 
> Sure.  I believe I still got the chroot I made.  I could pack it up
> and make it available on the web, if you want to poke in it?
> 
> > So, if I read the code properly, when /etc/shadow does not
> > exist....chage really exits with the errorcode 3 (E_NOT_SHADOWED).
> 
> /etc/shadow does not exist in the chroot.
> 
> > Any idea of what in your setup could have lead to this ?
> 
> I do not remember the details, but I believe I used this command line
> to generate the changelog, running in my sid chroot:
> 
>   ltsp-build-client --dist etch --mirror http://ftp.skolelinux.no/debian

Hmmm, we chould maybe check the versions of adduser and passwd in the chroot...


> Removing user `sshd'.
> dpkg: error processing ssh (--configure):
>  subprocess post-installation script returned error exit status 1
> 
> There is no /etc/shadow in the generated chroot.  Why can't ssh
> install when shadow passwords are disabled?

Because it uses adduser with asking it to unset the password ageing
settings. Then adduser call chage to achieve this and chage fails.

Changes we tried to do with Marc Haber were about setting up a
dedicated exit code when chage fails because of a missing shadow
file. This was done in shadow and chage now fails with an exit code of
3 when /etc/shadow isn't found. And thus adduser should recognize this
and behave appropriately.

This does not seem to happen in your case and chage fails with an exit
code of 1...which is what I try investigating.

Once we solve this, I think your problem won't be solved
completely. adduser will still fail, I think.




> I suspect the problem is that base-config is never executed for this
> chroot, and thus 'dpkg-reconfigure passwd' is never executed either.
> And as the debootstrap installation of passwd failed to generate the
> shadow file, installing ssh fails.
> 
> I see some possible solutions:
> 
>  - get ssh to install even when /etc/shadow is missing
>  - get passwd to generate the /etc/shadow file when installed by debootstrap
>  - preseed passwd to not make local users, and run 'dpkg-reconfigure
>    passwd' in ltsp-build-client.
> 
> I suspect the debian package ssh must have changed to make this a
> problem, as it work to build the client using sarge, and also using
> ubuntu.
> 
> Not sure why I send this to two different bugs, but I'll keep the
> address list of the email I am replying to.

IIRC, this is because we are considering there are issues both in
passwd/adduser and in ssh....



-- 






More information about the Pkg-shadow-devel mailing list