Jira (PUP-9195) Unable to modify user account expiry date when forcelocal == true

3 views
Skip to first unread message

Alexander Fisher (JIRA)

unread,
Oct 3, 2018, 4:56:04 AM10/3/18
to puppe...@googlegroups.com
Alexander Fisher created an issue
 
Puppet / Bug PUP-9195
Unable to modify user account expiry date when forcelocal == true
Issue Type: Bug Bug
Affects Versions: PUP 6.0.1, PUP 5.5.6
Assignee: Unassigned
Components: Types and Providers
Created: 2018/10/03 1:55 AM
Priority: Normal Normal
Reporter: Alexander Fisher

Puppet Version: 5.5.6 6.0.1
Puppet Server Version: 5.2.0
OS Name/Version: CentOS 7.5

Similar to https://tickets.puppetlabs.com/browse/PUP-8470 (where lusermod does not support -G), lusermod does not support -e either.

user {"someuser":
  ensure => present,
  forcelocal => true,
  expiry => "2019-05-31"
}

Desired Behavior:
user type allowed to modify local user's account expiry parameter

Actual Behavior:

Error: Could not set expiry on user[someuser]: Execution of '/sbin/lusermod -e 2019-05-31 someuser' returned 1: Error parsing arguments: unknown option.
Usage: lusermod [-imLU?] [-i|--interactive] [-c|--gecos STRING]
        [-d|--directory STRING] [-m|--movedirectory] [-s|--shell STRING]
        [-u|--uid NUM] [-g|--gid NUM] [-l|--login STRING]
        [-P|--plainpassword STRING] [-p|--password STRING] [-L|--lock]
        [-U|--unlock] [--commonname=STRING] [--givenname=STRING]
        [--surname=STRING] [--roomnumber=STRING] [--telephonenumber=STRING]
        [--homephone=STRING] [-?|--help] [--usage] [OPTION...] user
Error: /Stage[main]/Main/User[someuser]/expiry: change from 'absent' to '2019-05-31' failed: Could not set expiry on user[someuser]: Execution of '/sbin/lusermod -e  someuser' returned 1: Error parsing arguments: unknown option.
Usage: lusermod [-imLU?] [-i|--interactive] [-c|--gecos STRING]
        [-d|--directory STRING] [-m|--movedirectory] [-s|--shell STRING]
        [-u|--uid NUM] [-g|--gid NUM] [-l|--login STRING]
        [-P|--plainpassword STRING] [-p|--password STRING] [-L|--lock]
        [-U|--unlock] [--commonname=STRING] [--givenname=STRING]
        [--surname=STRING] [--roomnumber=STRING] [--telephonenumber=STRING]
        [--homephone=STRING] [-?|--help] [--usage] [OPTION...] user

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.7.1#77002-sha1:e75ca93)
Atlassian logo

Alexander Fisher (JIRA)

unread,
Oct 3, 2018, 4:56:04 AM10/3/18
to puppe...@googlegroups.com
Alexander Fisher commented on Bug PUP-9195
 
Re: Unable to modify user account expiry date when forcelocal == true

Looking at the fix for PUP-8470, this looks easy enough to fix.  I'll submit a PR shortly.

Alexander Fisher (JIRA)

unread,
Oct 3, 2018, 5:24:04 AM10/3/18
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Oct 8, 2018, 4:45:04 PM10/8/18
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Oct 8, 2018, 4:45:04 PM10/8/18
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Oct 8, 2018, 4:46:04 PM10/8/18
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Oct 16, 2018, 4:23:06 PM10/16/18
to puppe...@googlegroups.com

Melissa Stone (JIRA)

unread,
Oct 18, 2018, 12:02:05 PM10/18/18
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Fix Version/s: PUP 6.0.z
Fix Version/s: PUP 5.5.z

Melissa Stone (JIRA)

unread,
Oct 18, 2018, 12:02:06 PM10/18/18
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Fix Version/s: PUP 6.0.z
Fix Version/s: PUP 5.5.z
Fix Version/s: PUP 6.0.4
Fix Version/s: PUP 5.5.8

Melissa Stone (JIRA)

unread,
Oct 18, 2018, 12:07:05 PM10/18/18
to puppe...@googlegroups.com
Melissa Stone updated an issue
Change By: Melissa Stone
Release Notes Summary: When `forcelocal` is true and `expiry` is set, we now use `usermod` to manage a user rather than `lusermod`. `lusermod` does not support `-e`, and so would fail the puppet run.
Release Notes: Bug Fix

Jacob Helwig (JIRA)

unread,
Oct 18, 2018, 12:09:04 PM10/18/18
to puppe...@googlegroups.com

Jonathan Morris (JIRA)

unread,
Oct 23, 2018, 4:23:03 PM10/23/18
to puppe...@googlegroups.com
Jonathan Morris updated an issue
 
Change By: Jonathan Morris
Fix Version/s: PUP 6.0.4
Fix Version/s: PUP 6.0.3

Claire Cadman (JIRA)

unread,
Nov 1, 2018, 9:53:04 AM11/1/18
to puppe...@googlegroups.com
Claire Cadman updated an issue
Change By: Claire Cadman
Labels: Community resolved-issue-added

Austin Boyd (JIRA)

unread,
Dec 12, 2019, 8:48:03 AM12/12/19
to puppe...@googlegroups.com
Austin Boyd updated an issue
Change By: Austin Boyd
Zendesk Ticket IDs: 34197
Zendesk Ticket Count: 1
Reply all
Reply to author
Forward
0 new messages