Unable to create user on Ubuntu Server with Ansible

Clash Royale CLAN TAG#URR8PPP up vote
0
down vote
favorite
I run the following ansible script on my Centos and Ubuntu servers.
- name: add user testuser1
user:
name: "testuser1"
state: present
groups: "wheel"
The script worked fine on Centos but failed on Ubuntu.
The error message was:
fatal: [ubuntu1]: FAILED! =>
"changed": false,
"failed": true,
"invocation":
"module_args":
"append": false,
"comment": null,
"createhome": true,
"expires": null,
"force": false,
"generate_ssh_key": null,
"group": null,
"groups": [
"wheel"
],
"home": null,
"login_class": null,
"move_home": false,
"name": "testuser1",
"non_unique": false,
"password": null,
"remove": false,
"seuser": null,
"shell": null,
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on ubuntu1",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": false,
"uid": null,
"update_password": "always"
,
"msg": "Group wheel does not exist"
Does anyone have any idea why it failed on Ubuntu?
server groups
add a comment |Â
up vote
0
down vote
favorite
I run the following ansible script on my Centos and Ubuntu servers.
- name: add user testuser1
user:
name: "testuser1"
state: present
groups: "wheel"
The script worked fine on Centos but failed on Ubuntu.
The error message was:
fatal: [ubuntu1]: FAILED! =>
"changed": false,
"failed": true,
"invocation":
"module_args":
"append": false,
"comment": null,
"createhome": true,
"expires": null,
"force": false,
"generate_ssh_key": null,
"group": null,
"groups": [
"wheel"
],
"home": null,
"login_class": null,
"move_home": false,
"name": "testuser1",
"non_unique": false,
"password": null,
"remove": false,
"seuser": null,
"shell": null,
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on ubuntu1",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": false,
"uid": null,
"update_password": "always"
,
"msg": "Group wheel does not exist"
Does anyone have any idea why it failed on Ubuntu?
server groups
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I run the following ansible script on my Centos and Ubuntu servers.
- name: add user testuser1
user:
name: "testuser1"
state: present
groups: "wheel"
The script worked fine on Centos but failed on Ubuntu.
The error message was:
fatal: [ubuntu1]: FAILED! =>
"changed": false,
"failed": true,
"invocation":
"module_args":
"append": false,
"comment": null,
"createhome": true,
"expires": null,
"force": false,
"generate_ssh_key": null,
"group": null,
"groups": [
"wheel"
],
"home": null,
"login_class": null,
"move_home": false,
"name": "testuser1",
"non_unique": false,
"password": null,
"remove": false,
"seuser": null,
"shell": null,
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on ubuntu1",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": false,
"uid": null,
"update_password": "always"
,
"msg": "Group wheel does not exist"
Does anyone have any idea why it failed on Ubuntu?
server groups
I run the following ansible script on my Centos and Ubuntu servers.
- name: add user testuser1
user:
name: "testuser1"
state: present
groups: "wheel"
The script worked fine on Centos but failed on Ubuntu.
The error message was:
fatal: [ubuntu1]: FAILED! =>
"changed": false,
"failed": true,
"invocation":
"module_args":
"append": false,
"comment": null,
"createhome": true,
"expires": null,
"force": false,
"generate_ssh_key": null,
"group": null,
"groups": [
"wheel"
],
"home": null,
"login_class": null,
"move_home": false,
"name": "testuser1",
"non_unique": false,
"password": null,
"remove": false,
"seuser": null,
"shell": null,
"skeleton": null,
"ssh_key_bits": 0,
"ssh_key_comment": "ansible-generated on ubuntu1",
"ssh_key_file": null,
"ssh_key_passphrase": null,
"ssh_key_type": "rsa",
"state": "present",
"system": false,
"uid": null,
"update_password": "always"
,
"msg": "Group wheel does not exist"
Does anyone have any idea why it failed on Ubuntu?
server groups
edited May 15 at 16:00
Jason Aller
43158
43158
asked May 14 at 15:41
peter
82
82
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
1
down vote
I don't think ubuntu has a group named wheel, you can use
addgroup wheel
however it may be best if you what it is you are trying to accomplish.
Are you trying to add to the sudoers group? as this group is sudoers
usermod -aG sudo testuser1
add a comment |Â
up vote
0
down vote
There is no wheel group in Ubuntu. That's a Debian-ism that did not get included in Ubuntu by default.
The corresponding equivalent group for sudo access in Ubuntu is called sudo. You should be adding users who get sudo access to that group, and not wheel.
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
I don't think ubuntu has a group named wheel, you can use
addgroup wheel
however it may be best if you what it is you are trying to accomplish.
Are you trying to add to the sudoers group? as this group is sudoers
usermod -aG sudo testuser1
add a comment |Â
up vote
1
down vote
I don't think ubuntu has a group named wheel, you can use
addgroup wheel
however it may be best if you what it is you are trying to accomplish.
Are you trying to add to the sudoers group? as this group is sudoers
usermod -aG sudo testuser1
add a comment |Â
up vote
1
down vote
up vote
1
down vote
I don't think ubuntu has a group named wheel, you can use
addgroup wheel
however it may be best if you what it is you are trying to accomplish.
Are you trying to add to the sudoers group? as this group is sudoers
usermod -aG sudo testuser1
I don't think ubuntu has a group named wheel, you can use
addgroup wheel
however it may be best if you what it is you are trying to accomplish.
Are you trying to add to the sudoers group? as this group is sudoers
usermod -aG sudo testuser1
answered May 14 at 18:11
j-money
322110
322110
add a comment |Â
add a comment |Â
up vote
0
down vote
There is no wheel group in Ubuntu. That's a Debian-ism that did not get included in Ubuntu by default.
The corresponding equivalent group for sudo access in Ubuntu is called sudo. You should be adding users who get sudo access to that group, and not wheel.
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
add a comment |Â
up vote
0
down vote
There is no wheel group in Ubuntu. That's a Debian-ism that did not get included in Ubuntu by default.
The corresponding equivalent group for sudo access in Ubuntu is called sudo. You should be adding users who get sudo access to that group, and not wheel.
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
add a comment |Â
up vote
0
down vote
up vote
0
down vote
There is no wheel group in Ubuntu. That's a Debian-ism that did not get included in Ubuntu by default.
The corresponding equivalent group for sudo access in Ubuntu is called sudo. You should be adding users who get sudo access to that group, and not wheel.
There is no wheel group in Ubuntu. That's a Debian-ism that did not get included in Ubuntu by default.
The corresponding equivalent group for sudo access in Ubuntu is called sudo. You should be adding users who get sudo access to that group, and not wheel.
answered May 14 at 18:14
Thomas Wardâ¦
41.1k23112166
41.1k23112166
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
add a comment |Â
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I'm trying to create a new group called 'Wheel'..
â peter
May 14 at 19:52
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
I created a new group called 'Wheel' in both Centos OS and Ubuntu. The group was created in Centos but not in Ubuntu, and I don't know why?
â peter
May 14 at 19:54
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
Just to clarification the group name doesn't matter .. the group could have been called anything - the fact is that the group wasn't created in Ubuntu, but it was created in Centos.
â peter
May 14 at 20:31
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1036167%2funable-to-create-user-on-ubuntu-server-with-ansible%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password