Sven Mueller
2006-Jul-18 15:12 UTC
Bug#378717: adduser: warning introduced as fix to 159345 should not be issued when adding system users
Package: adduser Version: 3.94 Severity: minor The warning introduced to fix #159345 is also shown when adding system users. This does rarely make sense. An example is the cyrus-common-2.2 package (but I would guess that there are others that act accordingly), which contains the /var/lib/cyrus directory, which is later (once the user cyrus was created) assigned to that user. Currently, adduser unconditionally displays the following warning while the cyrus user is created by postinst: Warning: that home directory does not belong to the user you are currently creating As one of the cyrus-imapd packagers, I have two options to avoid showing that warning to the user installing cyrus-common-2.2: 1) Don''t include the /var/lib/cyrus directory in the package. Drawback: dpkg doesn''t know the directory belongs to that package. 2) Redirect STDERR of adduser to /dev/null. Drawback: True errors of adduser aren''t shown to the user anymore. So neither option seems to be the right one. Therefor, I see two options to resolve our bug #378518, and both would involve changes to the adduser package: 1) Make adduser suppress that warning when creating system users. 2) Add a commandline option to adduser to suppress that particular warning or all warnings. I kindly ask you to implement one of those. I thought about submitting this as a wishlist bug. However, since there are probably other packages suffering from the same "regression" (a bogus warning where there was no warning before), I decided against that. Feel free to change the severity as you like. Regards, Sven PS: If wanted, I can dig into the adduser source and see wether I could implement (1) above, which I think is the better option.
Debian Bug Tracking System
2006-Jul-18 16:56 UTC
[Adduser-devel] Bug#378717: marked as done (adduser: warning introduced as fix to 159345 should not be issued when adding system users)
Your message dated Tue, 18 Jul 2006 18:20:22 +0200 with message-id <44BD0A46.3050000@ciphirelabs.com> and subject line Warning not issued with --no-create-home has caused the attached Bug report 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 I am talking about this indicates a serious mail system misconfiguration somewhere. Please contact me immediately.) Debian bug tracking system administrator (administrator, Debian Bugs database) -------------- next part -------------- An embedded message was scrubbed... From: Sven Mueller <debian@incase.de> Subject: adduser: warning introduced as fix to 159345 should not be issued when adding system users Date: Tue, 18 Jul 2006 16:27:14 +0200 Size: 3467 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20060718/55c00e45/attachment.mht -------------- next part -------------- An embedded message was scrubbed... From: Sven Mueller <sm@ciphirelabs.com> Subject: Warning not issued with --no-create-home Date: Tue, 18 Jul 2006 18:20:22 +0200 Size: 2210 Url: http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20060718/55c00e45/attachment-0001.mht
Stephen Gran
2006-Jul-18 17:37 UTC
Bug#378717: [Adduser-devel] Bug#378717: adduser: warning introduced as fix to 159345 should not be issued when adding system users
This one time, at band camp, Sven Mueller said:> The warning introduced to fix #159345 is also shown when adding system > users. This does rarely make sense. An example is the cyrus-common-2.2 > package (but I would guess that there are others that act accordingly), > which contains the /var/lib/cyrus directory, which is later (once the > user cyrus was created) assigned to that user. > > Currently, adduser unconditionally displays the following warning while > the cyrus user is created by postinst: > > Warning: that home directory does not belong to the user you are > currently creating > > As one of the cyrus-imapd packagers, I have two options to avoid showing > that warning to the user installing cyrus-common-2.2: > 1) Don''t include the /var/lib/cyrus directory in the package. > Drawback: dpkg doesn''t know the directory belongs to that package. > 2) Redirect STDERR of adduser to /dev/null. > Drawback: True errors of adduser aren''t shown to the user anymore. > So neither option seems to be the right one. > > Therefor, I see two options to resolve our bug #378518, and both would > involve changes to the adduser package: > 1) Make adduser suppress that warning when creating system users. > 2) Add a commandline option to adduser to suppress that particular > warning or all warnings. > > I kindly ask you to implement one of those. > > I thought about submitting this as a wishlist bug. However, since there > are probably other packages suffering from the same "regression" (a > bogus warning where there was no warning before), I decided against > that. Feel free to change the severity as you like.Adding --ignore-uid-mismatch or some such would be easy enough to do, but it seems like the right thing to do here is to just make your scripts use --no-create-home. This will skip this code path altogether, and seems like the right thing to do if you ship the home directory in the package anyway. This is what I do in my packages that create users and also have the directory in the deb. Take care, -- ----------------------------------------------------------------- | ,''''`. Stephen Gran | | : :'' : sgran@debian.org | | `. `'' Debian user, admin, and developer | | `- http://www.debian.org | ----------------------------------------------------------------- -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature Url : http://lists.alioth.debian.org/pipermail/adduser-devel/attachments/20060718/9852d6a3/attachment.pgp