[debian-edu-commits] debian-edu/upstream/ 17/71: Make it easier to customise the hardcoded values.

Petter Reinholdtsen pere at moszumanska.debian.org
Mon Jun 9 18:25:36 UTC 2014


This is an automated email from the git hooks/post-receive script.

pere pushed a commit to branch master
in repository libpam-mklocaluser.

commit 57a1244a7d673801158f7194db2f0eb16dcbdb0c
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Sat May 1 17:15:21 2010 +0000

    Make it easier to customise the hardcoded values.
---
 debian/pam-python.py | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/debian/pam-python.py b/debian/pam-python.py
index 6ef9832..2133d1c 100755
--- a/debian/pam-python.py
+++ b/debian/pam-python.py
@@ -21,6 +21,12 @@ def check_and_create_localuser(pamh, user):
   # Location of local users
   topdir = "/home"
 
+  # Ignore users with uid below this one
+  minimum_uid = 1000
+
+  # Create user entries with this shell
+  shell = '/bin/bash'
+
   # Fetch current user and group info, possibly from LDAP or NIS.
   userinfo = pwd.getpwnam(user)
   uid = userinfo[2]
@@ -32,7 +38,7 @@ def check_and_create_localuser(pamh, user):
   groupname = groupinfo[0]
 
   # Ignore users with uid < 1000
-  if userinfo[2] < 1000:
+  if userinfo[2] < minimum_uid:
     return pamh.PAM_SUCCESS
 
   if None == homedir:
@@ -47,7 +53,6 @@ def check_and_create_localuser(pamh, user):
       # Can not use adduser, as it refuses to add an existing user.
       #cmd = "/usr/sbin/adduser --disabled-password --uid %d --gid %d --gecos '%s' --home %s %s" % \
       #    (uid, gid, gecos, newhomedir, user)
-      shell = '/bin/bash'
       cmd = "/bin/echo '%s:x:%d:%d:%s:%s:%s' >> /etc/passwd" \
             % (user, uid, gid, gecos, newhomedir, shell)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-edu/upstream/libpam-mklocaluser.git



More information about the debian-edu-commits mailing list