Hi Sebastian please check this
group_user_ensure(group='test', user='www')
I got this:
sudo: usermod -a -G 'test' 'www'
[mo9e] out: usermod: invalid option -- 'a'
[mo9e] out: Try `usermod --help' or `usermod --usage' for more information.
[mo9e] out:
Fatal error: sudo() received nonzero return code 2 while executing!
Requested: usermod -a -G 'test' 'www'
Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "usermod -a -G 'test' 'www'"
As per the man doesn't exist an option "-a"
Usage: usermod ...
usermod - modify a user account
-c comment Set the GECOS field for the new account
-D binddn Use dn "binddn" to bind to the LDAP directory
-d homedir Home directory for the new user
-e expire Date on which the new account will be disabled
-f inactive Days after a password expires until account is disabled
-G group,... List of supplementary groups
-g gid Name/number of the users primary group
-l login Change login name.
-m Move home directory to the new path
-o Allow duplicate (non-unique) UID
-A group,... List of groups the user should be added to
-R group,... List of groups the user should be removed from
-P path Search passwd, shadow and group file in "path"
-p password Encrypted password as returned by crypt(3)
-s shell Name of the user's login shell
-u uid Change the userid to the given number
--service srv Use nameservice 'srv'
-L Locks the password entry for "user"
-U Try to unlock the password entry for "user"
--help Give this help list
--usage Give a short usage message
-v, --version Print program version
Valid services are: files, ldap
Hi Sebastian please check this
group_user_ensure(group='test', user='www')I got this:
As per the man doesn't exist an option "-a"