debian/0000755000000000000000000000000012244414423007166 5ustar debian/copyright0000644000000000000000000000210512222644321011115 0ustar This package was debianized by Pierre Habouzit on Sun, 21 Aug 2005 15:20:41 +0200. It was downloaded from http://contribs.martymac.com/ Upstream Author: Ganaël LAPLANCHE Copyright: 2005-2009 (c) Ganaël LAPLANCHE This package is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 dated June, 1991. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL-2'. debian/changelog0000644000000000000000000002015312244414422011040 0ustar ldapscripts (2.0.5-1ubuntu1) trusty; urgency=low * Merge from Debian unstable. Remaining changes: - debian/runtime.debian: replaced /etc/libnss-ldap.conf references by /etc/ldap.conf, many thanks Ahmed El-Mahmoudy. -- Bhavani Shankar Sun, 24 Nov 2013 20:48:27 +0530 ldapscripts (2.0.5-1) unstable; urgency=low * Imported Upstream version 2.0.5 * Removed 06_builtin_locale.patch: fixed upstream. * debian/control: Update description. (Closes: #686140) * 02_debian_config.patch refreshed. * New patch 06_fix_logname.patch fixes logname invocation issues. (Closes: #719295) * debian/runtime.debian: Fix awk invocation. Should fix (LP: #1225440). * New patch 07_fix_log_perm.patch fixes permissions of log file. * New patch 08_fix_log_entry.patch fixes log entry when runtime is sourced from file with whitespaces. * debian/control: Bump Standard's version: no changes needed. -- Alexander GQ Gerasiov Tue, 01 Oct 2013 22:21:54 +0400 ldapscripts (2.0.1-2ubuntu1) raring; urgency=low * Merge from Debian Unstable. Remaining changes: - debian/runtime.debian: replaced /etc/libnss-ldap.conf references by /etc/ldap.conf, many thanks Ahmed El-Mahmoudy. -- Vibhav Pant Wed, 19 Dec 2012 21:07:08 +0530 ldapscripts (2.0.1-2) unstable; urgency=low * Depend on nslcd instead of libnss-ldap, and us it's config. (Closes: #610971, #681266.) * debian/runtime.debian: Specify default value for GCLASS. (Closes: #671613) * debian/control: Fix 'Perl' writing. (Closes: #656172.) * debian/control: Standards-version updated, no changes needed. -- Alexander GQ Gerasiov Mon, 27 Aug 2012 04:38:33 +0400 ldapscripts (2.0.1-1ubuntu1) precise; urgency=low * Merge from Debian testing (LP: #922834). Remaining changes: - debian/runtime.debian: replaced /etc/libnss-ldap.conf references by /etc/ldap.conf, many thanks Ahmed El-Mahmoudy. -- Leo Iannacone Fri, 27 Jan 2012 22:27:22 +0100 ldapscripts (2.0.1-1) unstable; urgency=low * Imported Upstream version 2.0.1 * Updated debian/patches/05_mktemp.patch. * Removed debian/patches/07_fix_free_uid_search.patch (fixed upstream). * debian/control: Replace PERL wirh Perl (Closes: #620473). * debian/control: Standards-version updated, no changes needed. -- Alexander GQ Gerasiov Mon, 16 Jan 2012 02:21:44 +0400 ldapscripts (1.10.0-1ubuntu1) oneiric; urgency=low * Merge from debian unstable (LP: #777924). Remaining changes: - debian/runtime.debian: replaced /etc/libnss-ldap.conf references by /etc/ldap.conf, many thanks Ahmed El-Mahmoudy. -- Paolo Sammicheli Tue, 22 Mar 2011 23:37:44 +0000 ldapscripts (1.10.0-1) unstable; urgency=low * debian/control: Standards-version updated, no changes needed. * Imported Upstream version 1.10.0 * debian/patches: Patches refreshed. * Added 07_fix_free_uid_search.patch. Thanks to Slavko (Closes: #609148) * debian/control: DEB_FIXPERMS_EXCLUDE replaced with DEB_FIXPERMS_EXCLUDE_ALL. -- Alexander GQ Gerasiov Mon, 21 Mar 2011 17:45:15 +0300 ldapscripts (1.9.0-3ubuntu1) natty; urgency=low * Merge from debian unstable, remaining changes: - debian/runtime.debian: replaced /etc/libnss-ldap.conf references by /etc/ldap.conf, many thanks Ahmed El-Mahmoudy. -- Lorenzo De Liso Mon, 03 Jan 2011 16:29:57 +0100 ldapscripts (1.9.0-3) unstable; urgency=low * Use pwgen as password generator by default. Closes: #592369. * runtime.debian: Fix nss-ldap.conf parsing. Closes: #601942. * debian/control: Suggests libnss-ldap, not libpam-ldap. * Bump standard's version, no changes needed. -- Alexander GQ Gerasiov Thu, 23 Dec 2010 15:35:18 +0300 ldapscripts (1.9.0-2) unstable; urgency=low * Switching to new dpkg v3 (quilt) format. * Fix problem with "not built-it" warnings in some locales. Closes: #555561. * debian/patches: Added DEP-3 annotations. * Bump standard's version, no changes needed. -- Alexander GQ Gerasiov Tue, 11 May 2010 15:55:03 +0400 ldapscripts (1.9.0-1) unstable; urgency=low * Imported Upstream version 1.9.0 * watch file added. * Bump standard's version, no changes needed. * Removed: 01_makefile_destdir.patch, 04_logname_replace.patch, 06_nouuencode_pwgen.patch and most of debian/patches/03_fix_manpages.patch. Were fixed upstream. -- Alexander GQ Gerasiov Fri, 23 Oct 2009 14:16:44 +0400 ldapscripts (1.8.0-3) unstable; urgency=low * Fix permissions for ldapscripts.passwd. Also add lintian-overrides for it. * Update my e-mail address. -- Alexander GQ Gerasiov Mon, 06 Jul 2009 00:54:10 +0400 ldapscripts (1.8.0-2) unstable; urgency=low * runtime.debian: fix warnings appears if libpam-ldap not installed. * runtime.debian: replace usage of libpam-ldap with libnss-ldap, because ldapscripts recommends the second one. * runtime.debian: replace egrep|sed|cut with simple awk. * runtime.debian: fix error if host but not uri is specified in libnss-ldap.conf. * Add README.Debian with some info. * Add VCS info in debian/control. * Remove debian/ldapscripts.conf as it's not used anymore. -- Alexander GQ Gerasiov Sun, 05 Jul 2009 14:51:40 +0400 ldapscripts (1.8.0-1) unstable; urgency=low * New upstream release. (Closes: #471500, #494101, #502678, #504698, #457251.) * Change Maintainer field (closes: #495221). * Add 01_makefile_destdir.patch, to allow make install into DESTDIR. * Add 02_debian_config.patch to use patched upstream config, but not one from debian/ dir as it was in the previous versions. Original config patched to allow user not to configure ldapscripts themself, but use configuration from libnss-ldap and libldap. debian/runtime.debian is also updated. (Closes: #502673, #375794.) * Add 03_fix_manpages.patch to fix various warnings lintian points to. * Description updated from Ubuntu patches. * Fix debian/control: no more require slapd, libpam-ldap; libnss-ldap and shareutils are now proposed and recommended, policy updated to 3.8.2, Homepage field added. * Add 04_logname_replace.patch: use "id -nu" instead of "logname", because logname wouldn't work if program has no control terminal. * Add 05_mktemp.patch: use mktemp instead of hacks with /dev/urandom. * Add 06_nouuencode_pwgen: pwgen command without uuencode, to remove dependence from shareutils. -- Alexander GQ Gerasiov Wed, 24 Jun 2009 18:00:23 +0400 ldapscripts (1.7.1-2) unstable; urgency=low * New upstream release: + Has the fix for CVE-2007-5373 (Closes: #445582). + User can now modify ldiff skeleton (Closes: #405755). * Make upstream support DESTDIR in its makefile. -- Pierre Habouzit Sun, 21 Oct 2007 12:27:03 +0200 ldapscripts (1.4-2etch1) stable-security; urgency=low [ Steffen Joeris ] * Incorporate changes from upstream security version 1.7.1 and patch etc/runtime (Closes: #445582) for CVE-2007-5373. -- Pierre Habouzit Sun, 21 Oct 2007 12:03:31 +0200 ldapscripts (1.4-2) unstable; urgency=low * Fix debian magic computation of GIDSTART/UIDSTART. thanks to Philippe Bourdeu d'Aguerre. * Bump standards version to 3.7.2 (no changes required). -- Pierre Habouzit Wed, 17 May 2006 11:05:17 +0200 ldapscripts (1.4-1) unstable; urgency=low * New upstream release. * Add missing dependency upon sharutils (closes: #340785). * Updated FSF address. -- Pierre Habouzit Sun, 8 Jan 2006 19:13:45 +0100 ldapscripts (1.3-1) unstable; urgency=low * New upstream release. -- Pierre Habouzit Tue, 25 Oct 2005 00:33:31 +0200 ldapscripts (1.2-2) unstable; urgency=low * Typo in default config (forgot a ldapscripts/). -- Pierre Habouzit Sun, 21 Aug 2005 16:53:31 +0200 ldapscripts (1.2-1) unstable; urgency=low * Initial Release (closes: #324296). -- Pierre Habouzit Sun, 21 Aug 2005 16:23:01 +0200 debian/README.Debian0000644000000000000000000000063312222644321011227 0ustar ldapscripts package shipped in Debian is slightly modified to work out of the box. If you have libnss-ldap installed and configured, ldapscripts will use configuration from libnss-ldap.conf. More details could be found in comments inside /etc/ldapscripts/ldapscripts.conf If you have any problems with ldapscripts' utilities, first look on /var/log/ldapscripts.log where all details, warnings and errors goes. debian/source/0000755000000000000000000000000012222644321010464 5ustar debian/source/format0000644000000000000000000000001412222644321011672 0ustar 3.0 (quilt) debian/control0000644000000000000000000000310412222644321010565 0ustar Source: ldapscripts Section: admin Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Alexander GQ Gerasiov Homepage: http://ldapscripts.sourceforge.net/ Standards-Version: 3.9.4 Build-Depends: cdbs, debhelper (>= 7.0.0) Vcs-Git: git://git.gq.net.ru/ldapscripts.git Vcs-Browser: http://git.gq.net.ru/?p=ldapscripts.git Package: ldapscripts Architecture: all Depends: ${misc:Depends}, ldap-utils Recommends: sharutils, pwgen Suggests: nslcd Description: Add and remove users and groups (stored in a LDAP directory) Ldapscripts are shell scripts that allow management of POSIX accounts (users, groups, machines) in a LDAP directory. They are similar to smbldap-tools but are written in shellscript, not Perl. . They only require OpenLDAP client commands (ldapadd, ldapdelete, ldapsearch, ldapmodify, ldappasswd) and make administrator's work a lot easier avoiding the need to configure Perl and each library dependency (e.g. Net::LDAP). . These scripts are very simple to configure by not requiring any Samba-related information (SID, profiles, homes, etc): management of Samba attributes is entirely done by standard commands (net, smbpasswd and pdbedit) used together with the scripts. Moreover, most of the configuration is guessed from the one of nslcd, and everything should work out from the box for most users. . The scripts may be used independently - within command lines - or automatically by Samba (like smbldap-tools), to handle POSIX information within accounts before adding Samba information. debian/patches/0000755000000000000000000000000012222644321010613 5ustar debian/patches/07_fix_log_perm.patch0000644000000000000000000000134112222611214014606 0ustar Index: ldapscripts/lib/runtime =================================================================== --- ldapscripts.orig/lib/runtime 2013-10-01 21:51:55.000000000 +0400 +++ ldapscripts/lib/runtime 2013-10-01 22:01:43.000000000 +0400 @@ -86,11 +86,19 @@ then if [ ! -w "$LOGFILE" ] then + _UMASK=$(umask) + umask 077 touch "$LOGFILE" 2>/dev/null if [ $? -ne 0 ] then echo "Unable to create $LOGFILE, exiting..." && exit 1 fi + umask $_UMASK + else + if [ $(($(stat -c %a "$LOGFILE")%10)) -ne 0 ] + then + echo "Unsafe permissions on $LOGFILE, exiting..." && exit 1 + fi fi echo "$1" >> "$LOGFILE" fi debian/patches/08_fix_log_entry.patch0000644000000000000000000000100412222611220014776 0ustar Index: ldapscripts/lib/runtime =================================================================== --- ldapscripts.orig/lib/runtime 2013-10-01 21:14:17.000000000 +0400 +++ ldapscripts/lib/runtime 2013-10-01 21:15:02.000000000 +0400 @@ -805,4 +805,4 @@ fi # Record command call into logfile -log_only "$(date '+%b %d %H:%M:%S') $(uname -n | sed 's|\..*$||') ldapscripts: $(basename $0)($USER): $0 $*" +log_only "$(date '+%b %d %H:%M:%S') $(uname -n | sed 's|\..*$||') ldapscripts: $(basename "$0")($USER): $0 $*" debian/patches/05_mktemp.patch0000644000000000000000000000246212222644321013441 0ustar From: Alexander Gerasiov Subject: Use more secure tempfile creation Upstream uses buggy-way to create temp files. It is vulnerable to several attack technics. But he likes it, because of portablity. As we have mktemp(1) here in Debian, we will use it. Forwarded: not-needed Index: ldapscripts/lib/runtime =================================================================== --- ldapscripts.orig/lib/runtime 2011-12-22 12:58:14.000000000 +0400 +++ ldapscripts/lib/runtime 2011-12-22 13:03:26.000000000 +0400 @@ -134,15 +134,10 @@ mktempf () { # Avoid creating two temporary files (must have been released before) [ -n "$_TMPFILE" ] && end_die "Error allocating temporary file $_TMPFILE" - # Name temp file - _TMPFILE="$TMPDIR/$(basename $0).$(date '+%Y%m%d-%H%M%S').$$.$(head -c4 /dev/random | od -t u4 | head -n 1 | awk '{print $2}')" + # Create temp file + _TMPFILE="$(mktemp -p $TMPDIR "$(basename "$0").$(date '+%Y%m%d-%H%M%S').XXXXXX")" # Catch CTRL-C to remove $_TMPFILE trap 'rm -f "$_TMPFILE" 2>/dev/null ; end_die "Interrupted - Removing temporary file $_TMPFILE"' 2 - # Create temp file - _TMPMASK=$(umask) - umask 0077 - touch "$_TMPFILE" 2>/dev/null || end_die "Error creating temporary file $_TMPFILE" - umask "$_TMPMASK" } # Releases a previously allocated temporary file debian/patches/03_fix_manpages.patch0000644000000000000000000000331312222644321014577 0ustar From: Alexander Gerasiov Subject: Fix in manpage to prevent lintian warning. Lintian dislike too long lines in manpage, so I've added non-significal space in filter example. Forwarded: not-needed Index: ldapscripts/man/man5/ldapscripts.5 =================================================================== --- ldapscripts.orig/man/man5/ldapscripts.5 2011-03-21 16:32:22.000000000 +0300 +++ ldapscripts/man/man5/ldapscripts.5 2011-03-21 16:40:46.000000000 +0300 @@ -73,4 +73,4 @@ .B "Additional information: value does not conform to assertion syntax". Setting slapd's debug level to 32 shows additional details : .B "get_ava: illegal value for attributeType uidNumber". -This is *not* a bug : the ldapscripts tend to use the power of LDAP filters to easily find users (or groups) using either a uidNumber (numerical value) or a uid (string value). The following filter (used by ldapfinger(1)) will generate the above message if $_USER is a login : "(|(&(objectClass=posixAccount)(|(uid=$_USER)(uidNumber=$_USER)))(&(objectClass=posixGroup)(|(cn=$_USER)(gidNumber=$_USER))))" because filter part "(uidNumber=$_USER)" requires an integer but gets a string. You can mostly ignore those warnings. +This is *not* a bug : the ldapscripts tend to use the power of LDAP filters to easily find users (or groups) using either a uidNumber (numerical value) or a uid (string value). The following filter (used by ldapfinger(1)) will generate the above message if $_USER is a login : "(|(&(objectClass=posixAccount)(|(uid=$_USER)(uidNumber=$_USER))) (&(objectClass=posixGroup)(|(cn=$_USER)(gidNumber=$_USER))))" because filter part "(uidNumber=$_USER)" requires an integer but gets a string. You can mostly ignore those warnings. debian/patches/series0000644000000000000000000000017712222644321012035 0ustar 02_debian_config.patch 03_fix_manpages.patch 05_mktemp.patch 06_fix_logname.patch 07_fix_log_perm.patch 08_fix_log_entry.patch debian/patches/02_debian_config.patch0000644000000000000000000001050612222644321014706 0ustar From: Alexander Gerasiov Subject: Debian-specific changes in ldapscripts.conf and runtime In Debian we try to use some knowlege from other configs (see runtime.debian). So I commented out some values here, and add notes for Debian users. I've alo commented usage of some tools, suggested, but not really needed for common work. . Inclusion of runtime.debian added to runtime file. Forwarded: not-needed Index: ldapscripts/etc/ldapscripts.conf =================================================================== --- ldapscripts.orig/etc/ldapscripts.conf 2013-10-01 17:43:16.000000000 +0400 +++ ldapscripts/etc/ldapscripts.conf 2013-10-01 17:43:16.000000000 +0400 @@ -16,14 +16,22 @@ # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. +# Note for Debian users: +# On Debian system ldapscripts will try to parse and use nslcd config. +# Look on commented variables and description lines started with DEBIAN. +# But you could override it's values here. + + # LDAP server -SERVER="ldap://localhost" +# DEBIAN: value from /etc/nslcd.conf (uri) is used. +#SERVER="ldap://localhost" # Suffixes -SUFFIX="dc=example,dc=com" # Global suffix -GSUFFIX="ou=Groups" # Groups ou (just under $SUFFIX) -USUFFIX="ou=Users" # Users ou (just under $SUFFIX) -MSUFFIX="ou=Machines" # Machines ou (just under $SUFFIX) +# DEBIAN: values from /etc/nslcd.conf (base maps) are used. +#SUFFIX="dc=example,dc=com" # Global suffix +#GSUFFIX="ou=Groups" # Groups ou (just under $SUFFIX) +#USUFFIX="ou=Users" # Users ou (just under $SUFFIX) +#MSUFFIX="ou=Machines" # Machines ou (just under $SUFFIX) # Authentication type # If empty, use simple authentication @@ -60,11 +68,12 @@ #GDUMMYMEMBER="uid=dummy,$USUFFIX,$SUFFIX" # User properties -USHELL="/bin/sh" -UHOMES="/home/%u" # You may use %u for username here +# DEBIAN: values from /etc/adduser.conf are used. +#USHELL="/bin/sh" +#UHOMES="/home/%u" # You may use %u for username here CREATEHOMES="no" # Create home directories and set rights ? -HOMESKEL="/etc/skel" # Directory where the skeleton files are located. Ignored if undefined or nonexistant. -HOMEPERMS="700" # Default permissions for home directories +#HOMESKEL="/etc/skel" # Directory where the skeleton files are located. Ignored if undefined or nonexistant. +#HOMEPERMS="755" # Default permissions for home directories # User passwords generation # Command-line used to generate a password for added users. @@ -72,11 +81,12 @@ # WARNING !!!! This is evaluated, everything specified here will be run ! # WARNING(2) !!!! Some systems (Linux) use a blocking /dev/random (waiting for enough entropy). # In this case, consider using /dev/urandom instead. -PASSWORDGEN="cat /dev/random | LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c8" +#PASSWORDGEN="cat /dev/random | LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c8" #PASSWORDGEN="pwgen" #PASSWORDGEN="echo changeme" #PASSWORDGEN="echo %u" #PASSWORDGEN="" +PASSWORDGEN="pwgen" # User passwords recording # you can keep trace of generated passwords setting PASSWORDFILE and RECORDPASSWORDS @@ -90,7 +100,7 @@ LOGFILE="/var/log/ldapscripts.log" # Temporary folder -TMPDIR="/tmp" +#TMPDIR="/tmp" # Various binaries used within the scripts # Warning : they also use uuencode, date, grep, sed, cut, which... @@ -119,12 +129,12 @@ # Character set conversion : $ICONVCHAR <-> UTF-8 # Comment ICONVBIN to disable UTF-8 conversion -ICONVBIN="/usr/bin/iconv" +#ICONVBIN="/usr/bin/iconv" #ICONVCHAR="ISO-8859-15" # Base64 decoding # Comment UUDECODEBIN to disable Base64 decoding -UUDECODEBIN="/usr/bin/uudecode" +#UUDECODEBIN="/usr/bin/uudecode" # Getent command to use - choose the ones used # on your system. Leave blank or comment for auto-guess. Index: ldapscripts/lib/runtime =================================================================== --- ldapscripts.orig/lib/runtime 2013-10-01 17:43:16.000000000 +0400 +++ ldapscripts/lib/runtime 2013-10-01 17:43:16.000000000 +0400 @@ -690,6 +690,9 @@ ### Source configuration file +_RUNTIME_DEBIAN="/usr/share/ldapscripts/runtime.debian" +. "$_RUNTIME_DEBIAN" || end_die "Unable to source runtime.debian, exiting..." + _CONFIGFILE="/etc/ldapscripts/ldapscripts.conf" . "$_CONFIGFILE" || end_die "Unable to source configuration file ($_CONFIGFILE), exiting..." debian/patches/06_fix_logname.patch0000644000000000000000000000102412222611205014421 0ustar Index: ldapscripts/lib/runtime =================================================================== --- ldapscripts.orig/lib/runtime 2013-10-01 17:43:28.000000000 +0400 +++ ldapscripts/lib/runtime 2013-10-01 17:48:53.000000000 +0400 @@ -715,7 +715,7 @@ # Set USER variable to the user's login name (do not trust current $USER value) USER=$(logname 2>/dev/null) -[ -z "$USER" ] && end_die 'Could not guess current user' +[ -n "$USER" ] || USER=$(id -un 2>/dev/null) # Check for bindpwd file if necessary if [ -z "$SASLAUTH" ] debian/ldapscripts.lintian-overrides0000644000000000000000000000012512222644321015072 0ustar ldapscripts: non-standard-file-perm etc/ldapscripts/ldapscripts.passwd 0640 != 0644 debian/rules0000755000000000000000000000111712222644321010244 0ustar #!/usr/bin/make -f include /usr/share/cdbs/1/rules/debhelper.mk # documentation DEB_INSTALL_DOCS_ALL := README VERSION TODO # changelogs DEB_INSTALL_CHANGELOGS_ALL := CHANGELOG DEB_INSTALL_EXAMPLES_ldapscripts := etc/*.sample DEB_FIXPERMS_EXCLUDE_ALL := etc/ldapscripts/ldapscripts.passwd install/ldapscripts:: $(MAKE) install DESTDIR=debian/ldapscripts PREFIX=/usr ETCDIR=/etc/ldapscripts LIBDIR=/usr/share/ldapscripts MANDIR=/usr/share/man cp debian/runtime.debian debian/ldapscripts/usr/share/ldapscripts rm debian/ldapscripts/etc/ldapscripts/*.sample clean:: $(MAKE) distclean debian/compat0000644000000000000000000000000212222644321010362 0ustar 7 debian/runtime.debian0000644000000000000000000000423112222644321012013 0ustar ### This file predefine some ldapscripts variables for Debian boxes. # # Copyright (c) 2005 Ganaël LAPLANCHE - Linagora # Copyright (c) 2005-2007 Pierre Habouzit # Copyright (c) 2009-2012 Alexander GQ Gerasiov # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, # USA. conffile='/etc/nslcd.conf' getfield() { local field="$1" local conffile='/etc/ldap.conf' local value if [ -f "$conffile" ];then value=$(awk "/^[ \t]*$field/ {sub(/^[ \t]*$field[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); print \$0; exit}" "$conffile") else value="$2" fi echo ${value:-$2} } getbase() { local field="base" local value if [ ! -f "$conffile" ];then value="$2" else if [ $# -eq 0 ];then value=$(awk "/^[ \t]*$field[ \t]+[a-zA-Z0-9]+=/ {sub(/^[ \t]*$field[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); print \$0; exit}" "$conffile") else local map="$1" value=$(awk "/^[ \t]*$field[ \t]+$map/ {sub(/^[ \t]*$field[ \t]+$map[ \t]*/,\"\"); sub(/[ \t]*(#.*)?\$/, \"\"); sub(/,$SUFFIX\$/, \"\"); print \$0; exit}" "$conffile") fi fi echo ${value:-$2} } # LDAP Configuration SERVER=$(getfield uri "$(getfield host '')" | awk '{print $1}') SUFFIX=$(getbase) USUFFIX=$(getbase passwd 'ou=People') GSUFFIX=$(getbase group 'ou=Groups') MSUFFIX=$(getbase hosts 'ou=Hosts') # User properties [ -f /etc/adduser.conf ] && . /etc/adduser.conf USHELL=${DSHELL:-"/bin/bash"} UHOMES=${DHOME:-"/home"}"/%u" HOMESKEL=${SKEL:-"/etc/skel"} HOMEPERMS=${DIR_MODE:-"0755"} TMPDIR="/tmp" GCLASS="posixGroup" debian/watch0000644000000000000000000000010012222644321010204 0ustar version=3 http://sf.net/ldapscripts/ldapscripts-([0-9.]*)\.tgz