Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 156311 - =net-analyzer/munin-1.3.2-r3: user 'munin' has invalid shell (/usr/sbin/nologin) for munin-cron
Summary: =net-analyzer/munin-1.3.2-r3: user 'munin' has invalid shell (/usr/sbin/nolog...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-26 08:39 UTC by Wolfram Schlich (RETIRED)
Modified: 2007-02-25 10:59 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfram Schlich (RETIRED) gentoo-dev 2006-11-26 08:39:19 UTC
I just installed munin and ran "emerge --config net-analyzer/munin" afterwards, which installed a crontab for the user 'munin'. Unfortunately, the contained cronjob cannot run, because the shell of the user 'munin' is "bad" (/usr/sbin/nologin). I am running fcron v3.
--8<--
2006-11-26 17:30:00 +01:00; noc1; cron.notice; fcron[24189]: Job [ -x /usr/bin/munin-cron ] && /usr/bin/munin-cron started for user munin (pid 24190)
2006-11-26 17:30:00 +01:00; noc1; auth.crit; nologin: Attempted login by UNKNOWN on UNKNOWN
2006-11-26 17:30:02 +01:00; noc1; cron.warning; fcron[24189]: Job [ -x /usr/bin/munin-cron ] && /usr/bin/munin-cron terminated (exit status: 1) (mailing output)
--8<--

After manually changing the shell to /bin/bash with "usermod -s /bin/bash munin", the nologin log message went away and munin-cron was being successfully run.
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-11-26 16:59:23 UTC
baselayout: somebody broke eutils.eclass!

These are the invocations by munin:
munin-1.3.2-r1.ebuild:	enewuser munin 177 -1 /var/lib/munin munin
munin-1.3.2-r2.ebuild:	enewuser munin 177 -1 /var/lib/munin munin
munin-1.3.2-r3.ebuild:	enewuser munin 177 -1 /var/lib/munin munin
munin-1.3.2.ebuild:	enewuser munin 177 -1 /var/lib/munin munin

Yet wschlich managed to get /usr/sbin/nologin on a Linux system, where it should have only turned up on *BSD/Darwin AFAIK.
Comment 2 SpanKY gentoo-dev 2006-11-26 20:40:53 UTC
wrong ... nologin is valid on any OS as you can `emerge nologin`
Comment 3 SpanKY gentoo-dev 2006-12-12 10:05:03 UTC
not a bug
Comment 4 Wolfram Schlich (RETIRED) gentoo-dev 2006-12-12 10:35:37 UTC
if it's not an eutils.eclass bug (I share that opinion),
then it's a munin package bug.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2006-12-12 13:17:03 UTC
munin does not choose nologin.

I pasted the enewuser lines from the munin package previously, and here they are again. It does NOT specifically choose nologin anywhere in the munin package.
munin-1.3.2-r1.ebuild:  enewuser munin 177 -1 /var/lib/munin munin
munin-1.3.2-r2.ebuild:  enewuser munin 177 -1 /var/lib/munin munin
munin-1.3.2-r3.ebuild:  enewuser munin 177 -1 /var/lib/munin munin
munin-1.3.2.ebuild:     enewuser munin 177 -1 /var/lib/munin munin

The -1 indicates that enewuser should use the shell that blocks login - which is either nologin or false depending on your system. eutils/enewuser is broken because chose nologin on a system where nologin was not actually present.

The only way I can see this happening, is if nologin was previous in /usr/sbin, but has now moved to /sbin. 
Vapier: has this happened?
Comment 6 SpanKY gentoo-dev 2006-12-12 19:48:46 UTC
how should i know ?  base-system doesnt maintain the nologin package

more likely the user had the "nologin" package installed and then when shadow started blocking it, they unmerged the package
Comment 7 Wolfram Schlich (RETIRED) gentoo-dev 2006-12-13 03:03:20 UTC
It seems the problem is not clear to you :)
nologin *is* present on my system.
It prevents the munin-cron cronjob from being run (see the log lines I posted).

Is this fcron specific (using values from /etc/passwd for the users shell),
does it work (using /usr/sbin/nologin) with vixie-cron?

A possible solution is to add 'SHELL=/bin/bash' to the crontab of the user 'munin'.
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2007-02-25 10:59:01 UTC
fixed in 1.3.3 in the tree.