On Fri, 31 Jul 2015 13:16:24 +0200 Guillem Jover <guillem@debian.org> wrote: > Hi! > > On Fri, 2015-07-31 at 11:34:20 +0200, Bastien ROUCARIES wrote: > > On Fri, Jul 31, 2015 at 11:04 AM, Bastien ROUCARIES wrote: > > > Lintian now detect script creating user pointing to /home. > > > After a chat under #debian-qa it appear that canonical path for non > > existant home dir is /nonexistant could be documented ? > > > > Moreover how can a developper could correct a mistake in previous > > package ? Rip the /home directory correct hte passd file ? > > To fix a wrong home path you can do something like: > > ,--- > # Fix the home directory name created by an old package. > u_home=$(getent passwd USERNAME | cut -d: -f6) > if [ "$u_home" = "OLDHOME" ] ; then > usermod --home NEWHOME USERNAME >/dev/null || true > fi > `--- > It's not as simple as that. You might still have running processes with that uid in which case usermod complains and exists. So to successfully run usermod you'd have to kill a processes running under that uid. -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
Attachment:
signature.asc
Description: OpenPGP digital signature