[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#706753: marked as done (libpam-mklocaluser: Fail to create local user during first login)



Your message dated Sat, 04 May 2013 19:13:01 +0000
with message-id <E1UYhtF-00026Z-6p@franck.debian.org>
and subject line Bug#706753: fixed in libpam-mklocaluser 0.8
has caused the Debian Bug report #706753,
regarding libpam-mklocaluser: Fail to create local user during first login
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
706753: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=706753
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package:  libpam-mklocaluser
Version:  0.7
Severity: serious
Tags:     patch
User:     debian-edu@lists.debian.org
Usertags: debian-edu

Yesterday it was brought to my attention that the roaming workstation
(aka laptop) profile in Debian Edu did not work in Wheezy.  Its design
is that the first time a user log in when the machine is connected to
the school network, a local user is created for the given user, and that
user can then log in on the laptop also when the machine is outside the
school network.

When trying this with the packages in wheezy, the user is not able to
log in and is thrown out when entering username and password in kdm.

This is the relevant entries in /var/log/auth.log when trying:

May  4 12:59:54 testhost kdm: :0[19878]: pam_unix(kdm:auth): authentication failure; logname= uid=0 euid=0 tty=:0 ruser= rhost=  user=testuser
May  4 12:59:55 testhost kdm: :0[19878]: pam_sss(kdm:auth): authentication success; logname= uid=0 euid=0 tty=:0 ruser= rhost= user=testuser
May  4 12:59:55 testhost kdm: :0[19878]: pam_unix(kdm:session): session opened for user testuser by (uid=0)
May  4 12:59:55 testhost pam_mklocaluser[19878]: Creating local passwd entry uid=1000(testuser) gid=1000(testuser) gecos='Petter Reinholdtsen' home=/home/testuser
May  4 12:59:55 testhost pam_mklocaluser[19878]: Unexpected exception, should never happen: must be string, not exceptions.AttributeError
May  4 12:59:55 testhost pam_mklocaluser[19878]: pam_ck_connector(kdm:session): nox11 mode, ignoring PAM_TTY :0
May  4 12:59:55 testhost kdm: :0[19878]: pam_unix(kdm:session): session closed for user testuser

I tracked down the cause, and it is triggered by changes to some python
library, possibly the subprocess library.  The following patch solve the
problem:

--- /usr/lib/libpam-mklocaluser/pam-python.py.old   2011-07-26 16:18:23.000000000 +0200
+++ /usr/lib/libpam-mklocaluser/pam-python.py  2013-05-04 12:58:29.595862692 +0200
@@ -16,13 +16,16 @@
 import syslog
 
 def runcmd(pamh, cmd):
-  proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE,)
+  proc = subprocess.Popen(cmd, shell=True, \
+                            stdout=subprocess.PIPE, \
+                            stderr=subprocess.PIPE,)
   while proc.poll() == None:
     pass
-  result = proc.communicate(input=None)[0]
-  if result != 0:
-    syslog.syslog("Command %(command)s failed with %(msg)s" % ( cmd, proc.stderr.read()) )
-#  print "output: %s" % output
+  (resultstdout, resultstderr) = proc.communicate(input=None)
+  if proc.returncode != 0:
+    msg = "Command '%s' failed with %s" % ( cmd, resultstderr.strip())
+    syslog.syslog(msg)
+#    print "output: %s" % msg
 
 def check_and_create_localuser(pamh, user):
   # Location of local users

The patch is already in upstream SVN will be included in the next
upstream release soon to be uploaded to unstable.

-- 
Happy hacking
Petter Reinholdtsen

--- End Message ---
--- Begin Message ---
Source: libpam-mklocaluser
Source-Version: 0.8

We believe that the bug you reported is fixed in the latest version of
libpam-mklocaluser, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 706753@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Petter Reinholdtsen <pere@debian.org> (supplier of updated libpam-mklocaluser package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 04 May 2013 08:25:53 +0200
Source: libpam-mklocaluser
Binary: libpam-mklocaluser
Architecture: source all
Version: 0.8
Distribution: unstable
Urgency: low
Maintainer: Debian Edu Developers <debian-edu@lists.debian.org>
Changed-By: Petter Reinholdtsen <pere@debian.org>
Description: 
 libpam-mklocaluser - Configure PAM to create a local user if it do not exist already
Closes: 706753
Changes: 
 libpam-mklocaluser (0.8) unstable; urgency=low
 .
   * Rewrite runcmd() to work with Python on Wheezy (Closes: #706753).
Checksums-Sha1: 
 9aa0d4eea67c35017c9b8a49e7e1e88d08d057b6 1057 libpam-mklocaluser_0.8.dsc
 da019acda61271c7534d5b4189e25c5f9af9bf08 5254 libpam-mklocaluser_0.8.tar.gz
 0eba247d97c00a5f18b4057ab58ee494a9bb06b1 5678 libpam-mklocaluser_0.8_all.deb
Checksums-Sha256: 
 ba87780587295d531948a71a02a49125c105312f4b8f64ffce23432c82492190 1057 libpam-mklocaluser_0.8.dsc
 627e5ea5af6533dfd65c6f5fd513f239afc4a54a8e1f75cb67565839ab6fa13d 5254 libpam-mklocaluser_0.8.tar.gz
 53c56c6931c339f061fb0106728a46e151867e7bb4865985510bd9c22416a93c 5678 libpam-mklocaluser_0.8_all.deb
Files: 
 31254d8bd2889ab5e1713e0302ba8ee1 1057 misc optional libpam-mklocaluser_0.8.dsc
 8edb2f63d6f727e5e7174d3141ad5096 5254 misc optional libpam-mklocaluser_0.8.tar.gz
 0d20f2add819eb1ff7170ffa7545b33d 5678 misc optional libpam-mklocaluser_0.8_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iD8DBQFRhPLS20zMSyow1ykRAmdJAJ4uudMFhroouIe/Q50/p7M4KMpgIACfaomF
/7NLl/74l4NpNY3PpmDUOeY=
=8+ce
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: