#36019 hooks: /etc/adduser/{pre,post}{user,group}{add,del}.d/

Package:
adduser
Source:
adduser
Submitter:
Topi Miettinen
Date:
2022-03-08 06:03:03 UTC
Severity:
wishlist
Tags:
#36019#5
Date:
1999-04-13 19:31:35 UTC
From:
To:
Add directories where other packages can add hooks for package-specific
per-user configuration, to be executed with run-parts. Some hooks should be
executed at package install time for existing users, likewise for package
removal and possibly modification. Also provide for local hooks.

Examples:

User add:
ssh: keygen
$HOME/tmp creation for $TMPDIR
yp/nis: add

User removal:
cron: crontab cleanup
at: cancel jobs
lpr*: purge jobs
base-files: clean /tmp, /var/tmp
*vi*: purge /var/tmp/vi.recover
*emacs: lock files
sendmail: /var/mail
yp/nis: remove
ssh: /tmp/ssh-agent

Local hacks:
removing user at master host causes removal at slaves

#36019#10
Date:
1999-10-04 04:05:33 UTC
From:
To:
reassign 36019 adduser

thanks

Since adduser is the pertinent Debian-policy-abbiding-account-management
program, this is probably more useful for it than shadow's tools (since
this would most likely require atleast a mini-policy).

Thanks,
  Ben

#36019#19
Date:
2004-03-24 13:57:48 UTC
From:
To:
retitle #36019 hooks: /etc/adduser/{pre,post}{user,group}{add,del}.d/
thanks

A valid point, suitable for the pending rewrite. There is a .local
hook, but that's probably not sufficient for your wishes?

Greetings
Marc

#36019#22
Date:
2004-03-24 13:57:48 UTC
From:
To:
retitle #36019 hooks: /etc/adduser/{pre,post}{user,group}{add,del}.d/
thanks

A valid point, suitable for the pending rewrite. There is a .local
hook, but that's probably not sufficient for your wishes?

Greetings
Marc

#36019#29
Date:
2004-03-24 14:26:03 UTC
From:
To:
merge #223932 #36019
thanks

I am merging this bug to the other hook-requesting bugs.

This looks too straight-forward to me. I'd love to see an integrated
patch that solves all hooks in a way that isn't that hard-coded.

Greetings
Marc

#36019#36
Date:
2006-01-30 17:41:39 UTC
From:
To:
Hi Marc,

regarding you're comment about the submitter's patch on #223932, do you
have any comments on the idea of implementing hooks as

/etc/adduser/{pre,post}{user,group}{add,del}.d/

(too forward, too detailed, not good).

Kind regards

T.

#36019#43
Date:
2010-03-16 19:39:50 UTC
From:
To:
user ubuntu-devel@lists.ubuntu.com
usertag 36019 + ubuntu-patch lucid
tag 36019 + patch
thanks

How about the attached patch as a starting point?  It adds:
/usr/share/adduser/add-user.d/
/usr/share/adduser/del-user.d/
/usr/share/adduser/add-group.d/
/usr/share/adduser/del-group.d/
/etc/adduser/add-user.d/
/etc/adduser/del-user.d/
/etc/adduser/add-group.d/
/etc/adduser/del-group.d/

Which all do as you would expect.  All the directories get passed to
run-parts after the appropriate event (adding/deleting users/groups).

The group scripts get passed "$group_name $gid", the user scripts get
passed "$user_name $uid $gid $home_dir".

Eh?

#36019#50
Date:
2017-04-03 21:28:29 UTC
From:
To:
Hello,

since there’s only infrequent updates on this one, I’d like to ask if there has been any progress on the topic?

:wq! PoC

#36019#55
Date:
2017-04-07 03:54:05 UTC
From:
To:
Hi,

على الإثنين  3 نيسـان 2017 ‫17:28، كتب Patrik Schindler:

No, no updates. My priority for the adduser bugs are those that I've
tagged 'confirmed'. I made patches for some of those, but I haven't
gotten around to setting up a testing environment to verify them and my
spare time has been extremely limited.

regards
Afif