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

Add uid and gid params to accounts::account #14

Merged
merged 1 commit into from
Sep 30, 2015

Conversation

mcanevet
Copy link
Contributor

No description provided.

mmckinst added a commit to mmckinst/puppet-accounts that referenced this pull request Sep 29, 2015
The README.md shows an example of hard coding a UID but that functionality isn't
in the module right now. Pull request camptocamp#14 has it so I merged it and resolved the
merge conflict.

Specifying the GID is also a nice feature, also included in pull request camptocamp#14 but
if you do that, you need go create the group for the user (with the specified
GID) before you create the user. Puppet does autorequire the group for the user,
but just selects the next GID available, you need to manually create the group
if you want a custom GID. See error below for what happens if you try to create
a user with a custom UID and GID:

```
Error: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
Error: /Stage[main]/Profiles::Base/Accounts::Account[@herp]/Accounts::Account[example]/User[example]/ensure: change from absent to present failed: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
```
mcanevet added a commit that referenced this pull request Sep 30, 2015
Add uid and gid params to accounts::account
@mcanevet mcanevet merged commit eea464e into camptocamp:master Sep 30, 2015
@mcanevet mcanevet deleted the dev/add_uid_and_gid branch September 30, 2015 14:25
johnzimm pushed a commit to johnzimm/xx-puppet-module-accounts that referenced this pull request Feb 24, 2016
The README.md shows an example of hard coding a UID but that functionality isn't
in the module right now. Pull request camptocamp#14 has it so I merged it and resolved the
merge conflict.

Specifying the GID is also a nice feature, also included in pull request camptocamp#14 but
if you do that, you need go create the group for the user (with the specified
GID) before you create the user. Puppet does autorequire the group for the user,
but just selects the next GID available, you need to manually create the group
if you want a custom GID. See error below for what happens if you try to create
a user with a custom UID and GID:

```
Error: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
Error: /Stage[main]/Profiles::Base/Accounts::Account[@herp]/Accounts::Account[example]/User[example]/ensure: change from absent to present failed: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
```
johnzimm pushed a commit to johnzimm/xx-puppet-module-accounts that referenced this pull request Feb 26, 2016
The README.md shows an example of hard coding a UID but that functionality isn't
in the module right now. Pull request camptocamp#14 has it so I merged it and resolved the
merge conflict.

Specifying the GID is also a nice feature, also included in pull request camptocamp#14 but
if you do that, you need go create the group for the user (with the specified
GID) before you create the user. Puppet does autorequire the group for the user,
but just selects the next GID available, you need to manually create the group
if you want a custom GID. See error below for what happens if you try to create
a user with a custom UID and GID:

```
Error: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
Error: /Stage[main]/Profiles::Base/Accounts::Account[@herp]/Accounts::Account[example]/User[example]/ensure: change from absent to present failed: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
```

test for when someone has custom gid

delete user's group with custom id too

test for removing user and group

we should only ensure the group if we're creating it

deletion of the group, regardless of the gid, will happen automatically

update test to reflect reality
johnzimm pushed a commit to johnzimm/xx-puppet-module-accounts that referenced this pull request Feb 26, 2016
The README.md shows an example of hard coding a UID but that functionality isn't
in the module right now. Pull request camptocamp#14 has it so I merged it and resolved the
merge conflict.

Specifying the GID is also a nice feature, also included in pull request camptocamp#14 but
if you do that, you need go create the group for the user (with the specified
GID) before you create the user. Puppet does autorequire the group for the user,
but just selects the next GID available, you need to manually create the group
if you want a custom GID. See error below for what happens if you try to create
a user with a custom UID and GID:

```
Error: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
Error: /Stage[main]/Profiles::Base/Accounts::Account[@herp]/Accounts::Account[example]/User[example]/ensure: change from absent to present failed: Could not create user example: Execution of '/sbin/useradd -g 66666 -d /home/example -p * -u 66666 -m example' returned 6: useradd: group '66666' does not exist
```

test for when someone has custom gid

delete user's group with custom id too

test for removing user and group

we should only ensure the group if we're creating it

deletion of the group, regardless of the gid, will happen automatically

update test to reflect reality
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

Successfully merging this pull request may close these issues.

1 participant