Hello Andreas

thank you for the quick reply!

On 2014-10-06 18:02:10, Andreas Henriksson wrote:
> Hello Sebastian Ramacher.
> 
> Thanks for your bug report and patch!
> 
> Judging from the severity you set I guess you don't see this as
> a blocker to be fixed before letting the package migrate to testing?

I'm not sure, but since nobody else on #d-devel seemed to have the same
issue I concluded that it might just be me and user important.

> On Mon, Oct 06, 2014 at 05:48:41PM +0200, Sebastian Ramacher wrote:
> [...]
> > Setting up libuuid1:amd64 (2.25.1-3) ...
> > Password: chsh: PAM: Authentication failure
> > dpkg: error processing package libuuid1:amd64 (--configure):
> [...]
> > diff -Nru util-linux-2.25.1/debian/libuuid1.postinst 
> > util-linux-2.25.1/debian/libuuid1.postinst
> > --- util-linux-2.25.1/debian/libuuid1.postinst      2014-10-05 
> > 19:06:55.000000000 +0200
> > +++ util-linux-2.25.1/debian/libuuid1.postinst      2014-10-06 
> > 17:06:13.000000000 +0200
> > @@ -17,7 +17,7 @@
> >  if getent passwd libuuid >/dev/null && ! getent passwd uuidd >/dev/null ; 
> > then
> >     # switch existing libuuid user to not have a login shell.
> >     if [ "$(getent passwd libuuid | cut -d: -f7)" = "/bin/sh" ]; then
> > -           chsh -s /bin/false libuuid
> > +           usermod -s /bin/false libuuid
> >     fi
> >  
> >     # attempt to stop potentially running uuidd, otherwise usermod will 
> > fail.
> 
> See the final line included in the context here. --^ :)

Uh, yes. To be honest, it was a quick "get my chroots back"-patch. Since
uuidd wasn't running there, it worked.

> If we use the usermod approach the shell changing snippet needs
> to be moved further below.
> 
> Please also see the comment in the top of the file, we need to make
> the same changes to uuid-runtime.postinst as well!

In the new patch I moved the invoke-rc.d bit to stop uuidd before
changing the shell. I also made the same changes in uuid-runtime's
postinst script.

> Possibly we could also look at merging the shell changing into the
> same usermod invocation as the rest.

I will leave that to you. This is already enough hacking on core package
maintainer scripts for me :)

Cheers
-- 
Sebastian Ramacher
diff -Nru util-linux-2.25.1/debian/changelog util-linux-2.25.1/debian/changelog
--- util-linux-2.25.1/debian/changelog	2014-10-05 19:06:55.000000000 +0200
+++ util-linux-2.25.1/debian/changelog	2014-10-06 20:11:17.000000000 +0200
@@ -1,3 +1,10 @@
+util-linux (2.25.1-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * debian/{libuuid1,uuid-runtime}.postinst: Use usermod instead of chsh.
+
+ -- Sebastian Ramacher <[email protected]>  Mon, 06 Oct 2014 20:11:14 +0200
+
 util-linux (2.25.1-3) unstable; urgency=medium
 
   [ Ben Hutchings ]
diff -Nru util-linux-2.25.1/debian/libuuid1.postinst util-linux-2.25.1/debian/libuuid1.postinst
--- util-linux-2.25.1/debian/libuuid1.postinst	2014-10-05 19:06:55.000000000 +0200
+++ util-linux-2.25.1/debian/libuuid1.postinst	2014-10-06 20:11:10.000000000 +0200
@@ -15,14 +15,14 @@
 	groupmod --new-name uuidd libuuid
 fi
 if getent passwd libuuid >/dev/null && ! getent passwd uuidd >/dev/null ; then
+	# attempt to stop potentially running uuidd, otherwise usermod will fail.
+	invoke-rc.d uuidd stop || true
+
 	# switch existing libuuid user to not have a login shell.
 	if [ "$(getent passwd libuuid | cut -d: -f7)" = "/bin/sh" ]; then
-		chsh -s /bin/false libuuid
+		usermod -s /bin/false libuuid
 	fi
 
-	# attempt to stop potentially running uuidd, otherwise usermod will fail.
-	invoke-rc.d uuidd stop || true
-
 	# rename user and set new homedir.
 	usermod --login uuidd --home /run/uuidd libuuid
 
diff -Nru util-linux-2.25.1/debian/uuid-runtime.postinst util-linux-2.25.1/debian/uuid-runtime.postinst
--- util-linux-2.25.1/debian/uuid-runtime.postinst	2014-10-05 19:06:55.000000000 +0200
+++ util-linux-2.25.1/debian/uuid-runtime.postinst	2014-10-06 18:18:16.000000000 +0200
@@ -6,14 +6,14 @@
 	groupmod --new-name uuidd libuuid
 fi
 if getent passwd libuuid >/dev/null && ! getent passwd uuidd >/dev/null ; then
+	# attempt to stop potentially running uuidd, otherwise usermod will fail.
+	invoke-rc.d uuidd stop || true
+
 	# switch existing libuuid user to not have a login shell.
 	if [ "$(getent passwd libuuid | cut -d: -f7)" = "/bin/sh" ]; then
-		chsh -s /bin/false libuuid
+		usermod -s /bin/false libuuid
 	fi
 
-	# attempt to stop potentially running uuidd, otherwise usermod will fail.
-	invoke-rc.d uuidd stop || true
-
 	# rename user and set new homedir.
 	usermod --login uuidd --home /run/uuidd libuuid
 

Attachment: signature.asc
Description: Digital signature

Reply via email to