Your message dated Sun, 12 Dec 2021 09:52:27 -0500 with message-id <[email protected]> and subject line Close bug #67964 has caused the Debian Bug report #67964, regarding Request for an "ensureuser" command for preinst scripts to be marked as done.
This means that you claim that the problem has been dealt with. If this is not the case it is now your responsibility to reopen the Bug report if necessary, and/or fix the problem forthwith. (NB: If you are a system administrator and have no idea what this message is talking about, this may indicate a serious mail system misconfiguration somewhere. Please contact [email protected] immediately.) -- 67964: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=67964 Debian Bug Tracking System Contact [email protected] with problems
--- Begin Message ---Package: adduser Version: 3.11 Severity: wishlist Hello I have the problem that my snort and mysql package need to have a user and group in passwd. Now at least with mysql I had much problems with users that had for historical reasonst (non debian packages) a group mysql but no user mysql or a user mysql but with a wrong shell etc. pp. Now I thought about a little script that takes the same arguments as adduser but, in contrast, checks every item in the right order and does only act when needed. i.e. if ! -x group then addgroup if ! -x user then adduser else if !right shell then chsh user /bin/bash ... ... What do you think about it. I would be willing to help! bye, -christian- -- System Information Debian Release: 2.2 Kernel Version: Linux lathspell 2.4.0-test5 #9 Die Jul 18 20:30:12 CEST 2000 i586 unknown Versions of the packages adduser depends on: ii passwd 19990827-18 Change and administer password and group dat
--- End Message ---
--- Begin Message ---Greetings: This bug has been tagged as "wontfix" since 2005. I think that a sufficient amount of time has passed to justify us going ahead and marking it as closed. It may help to note that the functions requested here to support maintainer scripts are already suitably provided by other tools, at least on any modern Debian installation. First, if you want to verify that user "mysql" exists on the system, you would invoke something like... if ! getent passwd mysql >/dev/null 2>&1; then # actions for when user does not exist ... fi Second, to verify a user's shell, you would simply receive the output of the "getent passwd" command and parse out the corresponding field in the passwd entry with the utility or shell feature of your choosing. This would apply to groups as well with the "getent group" command. Finally, as Marc Haber noted, overwriting local configuration in a maintainer script is usually a policy violation. So, there should seldom be a need for these types of checks. They are generally only useful when initially creating a system user or group in a maintainer script. I hope sufficient justification has been given for closing this. Let me know if there are any problems I failed to address. Thanks! -- Jason Franklin
--- End Message ---

