Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users don't get created when installing packages with yum #6735

Closed
rrauenza opened this issue Aug 15, 2013 · 7 comments
Closed

Users don't get created when installing packages with yum #6735

rrauenza opened this issue Aug 15, 2013 · 7 comments
Labels
Duplicate Duplicate of another issue or PR - will be closed
Milestone

Comments

@rrauenza
Copy link

With selinux enabled, useradd fails to run in the %pre scripts in rpm/yum.

This was on CentOS 6.4 with the ntpdate package.

The fix might just be a warning about selinux. Not sure. But filing this in case anyone else has same problem.

strace showed:
execve("/usr/sbin/useradd", ["/usr/sbin/useradd", "-u", "38", "-g", "38", "-s", "/sbin/nologin", "-M", "-r", "-d", "/etc/ntp", "ntp"],
[/* 20 vars */]) = -1 EACCES (Permission denied)

@terminalmage
Copy link
Contributor

This sounds like an selinux issue. There's nothing that Salt does by itself when installing packages with yum, that would cause user creation to be skipped.

@thatch45 thoughts?

@carwyn
Copy link

carwyn commented Aug 18, 2013

I've hit this with a number of packages e.g. memcached and libcgroup:

2013-08-18 22:34:37,037 [salt.loaded.int.module.yumpkg][ERROR ] Error in PREIN
scriptlet in rpm package libcgroup-0.37-7.el6.x86_64
2013-08-18 22:35:24,985 [salt.loaded.int.module.yumpkg][ERROR ] libcgroup-0.37
-7.el6.x86_64 /var/tmp/rpm-tmp.IZUECB: line 1: /usr/sbin/groupadd: Permission denied
error: %pre(libcgroup-0.37-7.el6.x86_64) scriptlet failed, exit status 126
error: install: %pre scriptlet failed (2), skipping libcgroup-0.37-7.el6

Ironically getting libcgroup on the machine was done to enable the selinux state to then switch it to permissive mode (state.selinux depends on semange which on RHEL 6.4 pulls in libcgroup).

The list of packages that this affects is quite large nrpe, nagios, samba for me so far with many of these packages installing reporting no errors. On systems running selinux salt needs more privs than it has by default at least on RHEL-a-like systems.

@carwyn
Copy link

carwyn commented Aug 19, 2013

This bug and those linked from it cover similar issues: https://bugzilla.redhat.com/show_bug.cgi?id=844167

@carwyn
Copy link

carwyn commented Aug 20, 2013

Duplicate of #1223, also see #1392 and SHA: 6dc2ca1

@basepi
Copy link
Contributor

basepi commented Aug 21, 2013

So should this one be closed as a duplicate?

@carwyn
Copy link

carwyn commented Aug 21, 2013

I'd say so yes. The current troubleshooting docs cover the workaround and #1392 covers the future ideal.

@rallytime
Copy link
Contributor

Closing as a duplicate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Duplicate of another issue or PR - will be closed
Projects
None yet
Development

No branches or pull requests

5 participants