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

Petter Reinholdtsen pere at hungry.com
Fri Sep 23 07:40:54 UTC 2005


[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

The ltsp-build-client comes from the ltsp-server package.  It might
have had some local modifcations to get debootstrap to resolve
dependencies.

I tried to run this command right now, and got the same error:

Setting up ssh (3.8.1p1-8.sarge.4) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
chage: can't open shadow password fileadduser: `/usr/bin/chage -M 99999 sshd' returned error code 1.  Aborting.
Cleaning up.
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?

I had a look in the debconf answers stored in the chroot:

# debconf-show passwd
  passwd/root-password: (password omitted)
  passwd/root-password-again: (password omitted)
  passwd/user-password-again: (password omitted)
  passwd/user-password: (password omitted)
  passwd/password-mismatch:
  passwd/username:
  passwd/password-empty:
  passwd/make-user: true
  passwd/shadow: true
  passwd/username-bad:
  passwd/user-fullname:
#

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.




More information about the Pkg-shadow-devel mailing list