summaryrefslogtreecommitdiff
path: root/lib/chef/provider/user
Commit message (Collapse)AuthorAgeFilesLines
* Load the correct resource in dscl provideruser_cleanupTim Smith2019-02-191-1/+2
| | | | | | This worked until I moved the interations property into the dscl_user resource directly. Signed-off-by: Tim Smith <tsmith@chef.io>
* Remove the legacy useradd user providerTim Smith2019-02-191-161/+0
| | | | Signed-off-by: Tim Smith <tsmith@chef.io>
* Add another description and simplify the windows checkTim Smith2019-02-191-4/+2
| | | | | | More cleanup Signed-off-by: Tim Smith <tsmith@chef.io>
* user resource: Remove support for macOS 10.7 and 10.7 upgraded to 10.8+Tim Smith2019-01-141-117/+36
| | | | | | We can greatly simplify our dscl user provider by removing support for macOS 10.7 and 10.7 which has been upgraded to 10.8. No one is using this anyone as it's beyond EOL with Apple and has been for years. Signed-off-by: Tim Smith <tsmith@chef.io>
* MSYS-888 Adds full_name property to user resource for Windows.vasu11052018-09-241-3/+4
| | | | Signed-off-by: vasu1105 <vasundhara.jagdale@msystechnologies.com>
* Fix issue of setting comment for windows userNAshwini2018-08-101-2/+2
| | | | Signed-off-by: NAshwini <ashwini.nehate@msystechnologies.com>
* Remove require mixlib/shellouts where not necessaryrequire_the_right_shelloutTim Smith2018-07-101-1/+1
| | | | | | the dscl user provider uses mixin/shell_out instead and the specs don't seem to use mixlib/shellout or actually need the require. Signed-off-by: Tim Smith <tsmith@chef.io>
* fix Style/MutableConstantLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* fix Style/UnneededInterpolationLamont Granquist2018-07-021-1/+1
| | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Unification of shell_out APIsLamont Granquist2018-06-156-35/+35
| | | | | | | converts all usage to just shell_out() from the numerous helper utilities that we've had previously. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* Merge pull request #7249 from chef/lcg/cleanup-userLamont Granquist2018-05-215-53/+105
|\ | | | | Cleanup AIX and Solaris user resources.
| * clean up updating_home?lcg/cleanup-userLamont Granquist2018-05-103-22/+0
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * bonus fix to remove unnecessary duping in dscl userLamont Granquist2018-05-101-7/+3
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * move should_set? to superclassLamont Granquist2018-05-103-13/+0
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * clean up AIX providerLamont Granquist2018-05-103-55/+37
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * better comment on /etc/shadow manglingLamont Granquist2018-05-101-1/+2
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * clean up solaris providerLamont Granquist2018-05-101-71/+54
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * migrate logic into aix and solaris subclassesLamont Granquist2018-05-093-11/+136
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
* | Fixing shell_out to have correct syntaxNick McSpadden2018-05-151-1/+1
| | | | | | | | Signed-off-by: Nick McSpadden <nmcspadden@gmail.com>
* | Merge branch 'master' into mac_uidNick McSpadden2018-05-147-212/+339
|\ \ | |/
| * mechanical conversion of most debug log statements to traceThom May2018-03-266-17/+17
| | | | | | | | Signed-off-by: Thom May <thom@chef.io>
| * Check for set home property before file existence (fixes #5777)Sean Karlage2018-01-041-1/+1
| | | | | | | | Signed-off-by: Sean Karlage <skarlage@fb.com>
| * fixes for rubocop 0.49.1 engineLamont Granquist2017-06-202-2/+2
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * change worning msg for windows create user resourceMSys2017-05-051-1/+1
| | | | | | | | Signed-off-by: MSys <harikesh.kolekar@msystechnologies.com>
| * Fix manage_home on AIXtm/aix_manage_homeThom May2017-04-271-1/+1
| | | | | | | | | | | | Fixes: #6092 Signed-off-by: Thom May <thom@chef.io>
| * fix build break on master in linux user providerlcg/fix-linux-userLamont Granquist2017-04-041-1/+1
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * Merge pull request #5720 from Ppjet6/masterSteven Murawski2017-04-041-0/+1
| |\ | | | | | | Add -u param to usermod in linux_user resource when using non_unique
| | * Add -u param to usermod in linux_user resource when using non_uniqueMaxime “pep” Buquet2017-01-251-0/+1
| | | | | | | | | | | | Signed-off-by: Maxime “pep” Buquet <pep@collabora.com>
| * | convert remaining popen4 code to shell_outLamont Granquist2017-04-011-7/+1
| | | | | | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * | Chef-13: Remove supports API from all user providersLamont Granquist2017-02-285-18/+18
| |/ | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * user provider cleanupLamont Granquist2016-12-227-179/+168
| | | | | | | | | | | | | | | | * removes more run_command * converts to shell_out_compact * some other misc style cleanup Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * Add a default GID for user creation on MacOS (#5393)cgerke2016-11-021-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | * Avoid ArgumentError new_resource.gid.to_s will be empty if a recipe calls the user resource without gid and changes the home property. Will result in an exception and if chef is run by root, the home dir will end up being owned by root from the mv. * Avoid chown issues when using manage_home and not specifying a gid Using a sensible CONSTANT for gid when new_resource.gid.nil? Signed-off-by: Chris Gerke <chris.gerke@gmail.com>
| * Solaris users are locked only if *LK*COOL-413/getent-on-solaris-doesnt-workTom Duffield2016-10-311-1/+1
| | | | | | | | | | | | | | | | | | According to `man shadow` on Solaris 10 and 11, an account is only locked if the first four characters in the password field are `*LK*`. The same is true for SmartOS (the OS for which the initial code was contributed). Signed-off-by: Tom Duffield <tom@chef.io>
| * Properly check lock status of user on solaris2Tom Duffield2016-10-311-12/+5
| | | | | | | | | | | | | | | | | | On Solaris, the 'shadow' database does not exist within `getent`, so the checking for the username there won't return accurate results. As the Solaris provider assumes user management via /etc/shadow, we can very easily parse the contents of the file directly. Signed-off-by: Tom Duffield <tom@chef.io>
| * fix manage_home provider inconsistencylcg/manage-home-consistencyLamont Granquist2016-10-064-23/+9
| | | | | | | | | | | | | | | | on freebsd and mac we're now telling people to use `manage_home` instead of `supports[:manage_home]` but it doesn't actually work. fixes that so that it works now. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * Fix solaris handling for -m/-M behavior. Fixes #5403.Noah Kantrowitz2016-10-051-2/+4
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * Fully override the method because we are planning to phase out the shared ↵Noah Kantrowitz2016-09-212-2/+14
| | | | | | | | | | | | base class anyway so the slight code duplication is fine. Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * Solaris doesn't support -r for users or group.Noah Kantrowitz2016-09-191-1/+2
| | | | | | | | Signed-off-by: Noah Kantrowitz <noah@coderanger.net>
| * revert supports[:manage_home] behaviorLamont Granquist2016-09-141-4/+14
| | | | | | | | | | | | | | even though i violently disagree that this is correct behavior and we're just going to break everyone in one massive go when we hit Chef 13. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * rewrite linu_user provider check_lockLamont Granquist2016-08-241-31/+19
| | | | | | | | | | | | | | | | | | | | | | | | this removes the kinda brittle kinda insane parsing of the installed rpm version. now we're just less strict about the exit 1 code and fail on the output not being what is expected. this also likely fixes a bug in rhel in why-run mode where shell_out! would have failed on the user-not-found and raised an exception that would have ended the run. the code before certainly looks buggy. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * sort out the -m / -M mess a bit betterLamont Granquist2016-08-231-5/+8
| | | | | | | | | | | | -M is not valid for usermod Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * clean up everythingLamont Granquist2016-08-231-5/+109
| | | | | | | | Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * user provider manage_home behavior and refactorLamont Granquist2016-08-197-8/+48
| | | | | | | | | | | | | | | | | | split out the user provider into 1:1 resources. fix the behavior of the linux user provider to implement manage_home behavior correctly. Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
| * autofixing Style/AccessModifierIndentation copLamont Granquist2016-08-162-2/+2
| |
* | Fixing missing final newlineNick McSpadden2016-05-051-1/+1
| |
* | UID now starts at 501, uses createhomedir insteadNick McSpadden2016-05-051-9/+7
|/
* chefstyle Style/AndOr fixesLamont Granquist2016-03-142-2/+2
| | | | | this is part of our informal style guide, lets make it formal since clearly its not getting followed very well.
* s/escape_glob/escape_glob_dir/lcg/fix-escape-globLamont Granquist2016-03-101-1/+1
| | | | | Removes all remaining references to the deprecated escape_glob helper routine.
* Revert "Merge pull request #4465 from ↵tm/revert_4465Thom May2016-03-021-2/+2
| | | | | | | artursitarski/change-shell-for-locked-user" This reverts commit 94494e761763b877c3ef3b52eee9ac9df2186340, reversing changes made to a95a87d50c9e5af2fbd583afcf972880656d1a4b.
* flip multiline function arguments aroundlcg/rubocop-0.37.2Lamont Granquist2016-02-191-2/+2
| | | | no enforced trailing comma on arguments...