Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 948439 - net-analyzer/nagios-core: /usr/bin/install: invalid user 'nagios'
Summary: net-analyzer/nagios-core: /usr/bin/install: invalid user 'nagios'
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal trivial
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-20 09:40 UTC by Matteo Salonia
Modified: 2025-01-20 12:37 UTC (History)
2 users (show)

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 Matteo Salonia 2025-01-20 09:40:43 UTC
Hi all,
recently, when trying to install nagios-core (4.5.8), I was met with a failed ebuild.

The relevant message is: `/usr/bin/install: invalid user 'nagios'`.
Mind you, I've never installed nagios on this system.

The fix was simple: create the 'nagios' user with the following command: `useradd -m nagios`

After this, the nagios-core and nagios packages installed without any further issues.

I don't know if it could be a one-off issue, if it's a problem only my system is facing, etc. In any case, I'm reporting this for posterity.

COMMON_FLAGS="-O2 -march=rocketlake -mtune=rocketlake"
CFLAGS="${COMMON_FLAGS}"
CXXFLAGS="${COMMON_FLAGS}"
FCFLAGS="${COMMON_FLAGS}"
FFLAGS="${COMMON_FLAGS}"
LDFLAGS="-fuse-ld=bfd -O2"
Comment 1 Zhixu Liu 2025-01-20 10:51:53 UTC
user 'nagios' should be installed during emerge, please post output of following cmd:

# ls -d /var/db/pkg/acct-*/nagios-*
/var/db/pkg/acct-group/nagios-0-r3  /var/db/pkg/acct-user/nagios-0-r3
# grep acct /var/db/pkg/net-analyzer/nagios-core-4.5.*/*DEPEND
/var/db/pkg/net-analyzer/nagios-core-4.5.1/BDEPEND:acct-group/nagios acct-user/nagios virtual/mailx dev-lang/perl:0/5.40= app-arch/unzip virtual/pkgconfig
/var/db/pkg/net-analyzer/nagios-core-4.5.1/RDEPEND:acct-group/nagios acct-user/nagios virtual/mailx dev-lang/perl:0/5.40= dev-libs/libltdl:0 media-libs/gd[jpeg,png] app-vim/nagios-syntax >=sys-libs/glibc-2.40-r5
Comment 2 Matteo Salonia 2025-01-20 11:09:20 UTC
(In reply to Zhixu Liu from comment #1)
> user 'nagios' should be installed during emerge, please post output of
> following cmd:
> 
> # ls -d /var/db/pkg/acct-*/nagios-*
> /var/db/pkg/acct-group/nagios-0-r3  /var/db/pkg/acct-user/nagios-0-r3

Same as yours:
/var/db/pkg/acct-group/nagios-0-r3  /var/db/pkg/acct-user/nagios-0-r3

> # grep acct /var/db/pkg/net-analyzer/nagios-core-4.5.*/*DEPEND
> /var/db/pkg/net-analyzer/nagios-core-4.5.1/BDEPEND:acct-group/nagios
> acct-user/nagios virtual/mailx dev-lang/perl:0/5.40= app-arch/unzip
> virtual/pkgconfig
> /var/db/pkg/net-analyzer/nagios-core-4.5.1/RDEPEND:acct-group/nagios
> acct-user/nagios virtual/mailx dev-lang/perl:0/5.40= dev-libs/libltdl:0
> media-libs/gd[jpeg,png] app-vim/nagios-syntax >=sys-libs/glibc-2.40-r5

Looks like it's OK?
/var/db/pkg/net-analyzer/nagios-core-4.5.8/BDEPEND:acct-group/nagios acct-user/nagios virtual/mailx dev-lang/perl:0/5.40= app-arch/unzip virtual/pkgconfig
/var/db/pkg/net-analyzer/nagios-core-4.5.8/RDEPEND:acct-group/nagios acct-user/nagios virtual/mailx dev-lang/perl:0/5.40= dev-libs/libltdl:0 media-libs/gd[jpeg,png] >=sys-libs/glibc-2.39-r9
Comment 3 Matteo Salonia 2025-01-20 11:12:03 UTC
emerge --info:

Portage 3.0.66.1 (python 3.12.4-final-0, default/linux/amd64/23.0/split-usr, gcc-14, glibc-2.39-r9, 6.12.8-gentoo x86_64)
=================================================================
System uname: Linux-6.12.8-gentoo-x86_64-11th_Gen_Intel-R-_Core-TM-_i5-11400_@_2.60GHz-with-glibc2.39
KiB Mem:    16277328 total,    655564 free
KiB Swap:    8388604 total,   8388604 free
Timestamp of repository gentoo: Mon, 20 Jan 2025 09:00:00 +0000
Head commit of repository gentoo: 807710c480fc77ca494fc0166915521e7ded35c5
Timestamp of repository guru: Fri, 17 Jan 2025 14:33:26 +0000
Head commit of repository guru: 1ca117df78bec56d8d3d9f9a1e321fa5db75eea3

Timestamp of repository librewolf: Sun, 19 Jan 2025 10:03:39 +0000
Head commit of repository librewolf: fb7e1e01242a06cc3e7ee79c018ff3a0f279a01c

Timestamp of repository php-overlay: Tue, 31 Dec 2024 16:03:18 +0000
Head commit of repository php-overlay: e2db660797cff76b5299c74156d0cbd9389633f1

sh bash 5.2_p26-r5
ld GNU ld (Gentoo 2.42 p3) 2.42.0
distcc 3.4 x86_64-pc-linux-gnu [disabled]
ccache version 4.10.2 [enabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p26-r5::gentoo
dev-build/autoconf:        2.72-r1::gentoo
dev-build/automake:        1.16.5-r2::gentoo
dev-build/cmake:           3.29.3::gentoo
dev-build/libtool:         2.4.7-r4::gentoo
dev-build/make:            4.4.1-r1::gentoo
dev-build/meson:           1.4.1::gentoo
dev-java/java-config:      2.3.4::gentoo
dev-lang/perl:             5.40.0::gentoo
dev-lang/python:           3.11.10_p1::gentoo, 3.12.4_p1::gentoo
dev-lang/rust-bin:         1.82.0-r100::gentoo
dev-util/ccache:           4.10.2-r1::gentoo
sys-apps/baselayout:       2.15::gentoo
sys-apps/openrc:           0.54.2::gentoo
sys-apps/sandbox:          2.39::gentoo
sys-devel/binutils:        2.42-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/gcc:             14.2.1_p20241221::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-kernel/linux-headers:  6.9::gentoo (virtual/os-headers)
sys-libs/glibc:            2.39-r9::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: False
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 
    sync-rsync-verify-metamanifest: yes

guru
    location: /var/db/repos/guru
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/guru.git
    masters: gentoo
    volatile: False

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/librewolf.git
    masters: gentoo
    volatile: False

php-overlay
    location: /var/db/repos/php-overlay
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/php-overlay.git
    masters: gentoo
    volatile: False

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE Elastic-2.0"
CBUILD="x86_64-pc-linux-gnu"
CC="gcc"
CFLAGS="-O2 -pipe -march=rocketlake -mtune=rocketlake"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php8.3/ext-active/ /etc/php/cgi-php8.3/ext-active/ /etc/php/cli-php8.3/ext-active/ /etc/php/fpm-php8.3/ext-active/ /etc/php/phpdbg-php8.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -pipe -march=rocketlake -mtune=rocketlake"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--jobs 1 --load-average 8.0"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe -march=rocketlake -mtune=rocketlake"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live ccache config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync merge-wait multilib-strict network-sandbox news parallel-fetch parallel-install pid-sandbox pkgdir-index-trusted preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -march=rocketlake -mtune=rocketlake"
GENTOO_MIRRORS="rsync://mirror.eu.oneandone.net/gentoo/     rsync://mirror.netzwerge.de/gentoo     rsync://ftp-stud.hs-esslingen.de/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-fuse-ld=bfd -O2"
LEX="flex"
MAKEOPTS="-j8 -l8"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="10bit 12bit 8bit adns aio amd64 bash-completion bindist bpf bzip2 ccache cet crypt drm elogind gdbm hwloc iconv initramfs ipv6 jit libtirpc lm-sensors logrotate man multilib ncurses nvme openmp pam pcre readline seccomp split-usr ssl test-rust threads udev unicode vaapi xattr zlib zstd" ABI_X86="64" ADA_TARGET="gcc_13" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_anon authn_dbm authn_file authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir env expires ext_filter file_cache filter headers include info log_config logio mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax navcom oceanserver oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 tsip tripmate tnt ublox" GRUB_PLATFORMS="efi-64" GUILE_SINGLE_TARGET="3-0" GUILE_TARGETS="3-0" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en en-US it" LCD_DEVICES="bayrad cfontz glk hd44780 lb216 lcdm001 mtxorb text" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PERL_FEATURES="ithreads quadmath" PHP_TARGETS="php8-3" POSTGRES_TARGETS="postgres16" PYTHON_SINGLE_TARGET="python3_12" PYTHON_TARGETS="python3_12" RUBY_TARGETS="ruby32" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipp2p iface geoip fuzzy condition tarpit sysrq proto logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PYTHONPATH, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 4 Zhixu Liu 2025-01-20 11:18:38 UTC
looks like acct-user/nagios not installed as expected? do you have the log file?

if no, try remove user nagios, then reemerge by `emerge -Ov1e acct-user/nagios`
then `grep nagios /etc/passwd`, user 'nagios' should be added
then reemerge nagios-core to see problem still exist or not
Comment 5 Matteo Salonia 2025-01-20 11:25:43 UTC
(In reply to Zhixu Liu from comment #4)
> looks like acct-user/nagios not installed as expected? do you have the log
> file?

Unfortunately not.

> if no, try remove user nagios, then reemerge by `emerge -Ov1e
> acct-user/nagios`
> then `grep nagios /etc/passwd`, user 'nagios' should be added
> then reemerge nagios-core to see problem still exist or not

$ grep nagios /etc/passwd
nagios:x:1008:1009::/home/nagios:/bin/bash

$ usermod -rG nagios my-user
$ userdel -f nagios
$ groupdel -f nagios

$ grep nagios /etc/passwd
# no results

$ emerge -a acct-{user,group}/nagios

$ grep nagios /etc/passwd
nagios:x:436:436:System user; nagios:/dev/null:/sbin/nologin

That seems to have done the trick, cheers!

I don't know why, despite showing up as installed (both acct-user/nagios and acct-group/nagios), it threw that error. Weird.
Comment 6 Zhixu Liu 2025-01-20 12:37:28 UTC
one possible reason is 'nagios' deleted

so I'm closing this, feel free to reopen if found more logs etc...