Re: Removing gitolite package doesn't remove gitolite user

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 03/31/2017 10:12 PM, Ricardo Band wrote:
> On Fri, 2017-03-31 at 20:37 -0500, Doug Newgard wrote:
>>
>> Short version here, you deleted the user's home dir manually and left
>> the user.
>> That's not a packaging problem.
> 
> Yep. But shouldn't the home dir be recreated when I reinstall the
> package?

You are literally responding to a post in which you are told that this
"shouldn't" be done.

> It seems that the package only executes a useradd command that creates
> the user home. If the user already exists that command seems to return
> true without recreating the home.

Correct. Since the user home dir is created as part of the user creation
itself, it makes sense to assume that the user home dir is *deleted* as
part of the user deletion itself.

You have now learned a valuable lesson: don't delete user home dirs for
system users, without first making sure the system user is deleted as
well (in addition to anything else that system user may have been
responsible for).

> The package could check for the dir after that and if it's not there
> create it. The package method in the PKGBUILD already includes the
> creation of the directory but it doesn't seem to fire if the user is
> already there. Which is a bit weird because I don't see any check for
> the user in there [1].
> 
> [1]: https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUI
> LD?h=packages/gitolite

No, the PKGBUILD package() method does not in fact create the directory
in any way, shape, or form. If it did, you wouldn't have had this problem.

-- 
Eli Schwartz

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux