-
Notifications
You must be signed in to change notification settings - Fork 23.7k
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
user module with option local fails on Ubuntu #32199
Comments
@rmfrankch FYI, the reason it's failing is because |
cc @bcoca - looks like you added the |
@nitzmahone: Unfortunately the workaround won't work, as I have both cases: with and without creating homes using the user module. Your suggestion would mean that I cannot use the local option if I don't want to create the homes. |
so we need to make it -M when luser? many 'useradd' implementations only support -m, not -M does lusermod have the same issues? |
this patch should fix
|
ISSUE TYPE
COMPONENT NAME
user module
ANSIBLE VERSION
CONFIGURATION
Nothing changed.
OS / ENVIRONMENT
Ubuntu 16.04LTS
local ansible run (local host only)
libuser 0.60 installed
Using the AD for authentication, users are defined in /etc/passwd => nsswitch.conf does NOT have sss for passwd, group, and shadow.
SUMMARY
I tried to create a local user using the user module with the local option (available as of 2.4).
This fails on Ubuntu 16.04LTS with the error:
Error parsing arguments: unknown option. Usage: luseradd [-irMn?] [-i|--interactive] [-r|--reserved] [-c|--gecos=STRING] [-d|--directory=STRING] [-k|--skeleton=STRING] [-s|--shell=STRING] [-u|--uid=NUM] [-g|--gid=STRING] [-M|--nocreatehome] [-n|--nocreategroup] [-P|--plainpassword=STRING] [-p|--password=STRING] [--commonname=STRING] [--givenname=STRING] [--surname=STRING] [--roomnumber=STRING] [--telephonenumber=STRING] [--homephone=STRING] [-?|--help] [--usage] [OPTION...] user
This works if local is false.
STEPS TO REPRODUCE
Install libuser if not installed
Add a new user to the local /etc/passwd file using the user module and the local option set to true.
users contains one full user record. This works fine with local: false
EXPECTED RESULTS
To add the user just as with local:false.
ACTUAL RESULTS
The module fails with the above error message.
The text was updated successfully, but these errors were encountered: