Package: rancid-core
Version: 2.3.1-4
Severity: normal
The postinst script for rancid-core calls usermod to set the rancid user's
home directory. This fails if the user database is not /etc/passwd (e.g.
when using LDAP.) Attached patch uses getent to check the rancid user's
current home directory and does not call usermod if it is already correct.
This allows users not using /etc/passwd to avoid the error by manually
creating a correct rancid user.
--- rancid-core.postinst.orig 2008-01-25 15:31:10.000000000 +0000
+++ rancid-core.postinst 2008-01-25 15:05:18.000000000 +0000
@@ -52,7 +52,10 @@
# ln -sf ../share/doc/rancid-core /usr/doc/rancid-core
#fi
if ( id rancid > /dev/null 2>&1 ) ; then
- /usr/sbin/usermod -d /var/lib/rancid -m rancid
+ HDIR=`getent passwd rancid | cut -d':' -f 6`
+ if [ $HDIR != '/var/lib/rancid' ]; then
+ /usr/sbin/usermod -d /var/lib/rancid -m rancid
+ fi
else
/usr/sbin/useradd -d /var/lib/rancid -s /bin/csh rancid
fi
--
Jonathan Oddy
Senior Systems Administrator
Email [EMAIL PROTECTED]
2 More London Riverside, London, SE1 2JR, UK
((truphone)) gives you free and low-cost calls on your mobile - try us now
http://www.truphone.com
Truphone is the trading name of Software Cellular Network Ltd. registered in
England and Wales (registered company number: 4187081). Registered office:
Carmelite, 50 Victoria Embankment, Blackfriars, London EC4Y 0DX
This e-mail, and any attachment/s, may contain information which is
confidential or privileged, and is intended for the addressee only. If you are
not the intended recipient, you may not disclose, copy or distribute this
information in any manner whatsoever. If you have received this e-mail in
error, please contact the sender immediately and delete it.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]