[Adduser-devel] Bug#394886: adduser does not work if libpam-smbpass is enabled

Markus Wiederkehr markus.wiederkehr at gmail.com
Mon Oct 23 16:35:41 UTC 2006

Package: adduser
Version: 3.99
Severity: wishlist

Adduser does not work if the PAM module libpam-smbpass was enabled by adding
"password   required     pam_smbpass.so nullok use_authtok try_first_pass"
to /etc/pam.d/common-password. This is what happens:

> root at orion$ adduser --debug charly
> Adding user `charly' ...
> Selecting UID from range 1000 to 29999 ...
> Selecting GID from range 1000 to 29999 ...
> Adding new group `charly' (1001) ...
> /usr/sbin/groupadd -g 1001 charly
> Adding new user `charly' (1001) with group `charly' ...
> /usr/sbin/useradd -d /home/charly -g charly -s /bin/bash -u 1001 charly
> Creating home directory `/home/charly' ...
> Copying files from `/etc/skel' ...
> passwd: User not known to the underlying authentication module
> passwd: password unchanged
> Try again? [Y/n]

The reason is that the adduser script invokes groupadd, useradd and passwd,
in that order. The invocation of passwd fails because the user does not 
yet exist in the local smbpasswd file. It is necessary to invoke "smbpasswd
-a -n $user" after useradd but before passwd.

Please provide some kind of hook that can be used for this purpose. A
similiar hook would be needed in deluser in order to invoke "smbpasswd
-x $user" at the right moment.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages adduser depends on:
ii  debconf [debconf-2.0]       1.5.6        Debian configuration management sy
ii  passwd                      1: change and administer password and
ii  perl-base                   5.8.8-6.1    The Pathologically Eclectic Rubbis

adduser recommends no packages.

-- debconf information:
* adduser/homedir-permission: true

More information about the Adduser-devel mailing list