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

"usermod -d ..." fails #95

Open
mimmus opened this issue Mar 16, 2018 · 1 comment
Open

"usermod -d ..." fails #95

mimmus opened this issue Mar 16, 2018 · 1 comment

Comments

@mimmus
Copy link

mimmus commented Mar 16, 2018

I need set only ssh keys for the user 'mysql" but I get:

Error: Could not set home on user[mysql]: Execution of '/sbin/usermod -d /home/mysql mysql' returned 8: usermod: user mysql is currently used by process 2621
Error: /Stage[main]/Accounts/Accounts::User[mysql]/User[mysql]/home: change from /var/lib/mysql to /home/mysql failed: Could not set home on user[mysql]: Execution of '/sbin/usermod -d /home/mysql mysql' returned 8: usermod: user mysql is currently used by process 2621

Added:
managehome: false
but no luck.

@deric
Copy link
Owner

deric commented Mar 18, 2019

From man usermod:

CAVEATS
       You must make certain that the named user is not executing any processes when this command is being executed if the user's numerical user
       ID, the user's name, or the user's home directory is being changed.  usermod checks this on Linux, but only check if the user is logged in
       according to utmp on other architectures.

seems like you're running mysql as a logged user (e.g. root)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants