Jira (PUP-9391) HP-UX usermod syntax is incorrect

18 views
Skip to first unread message

Carla Curtis (JIRA)

unread,
Jan 2, 2019, 11:21:03 AM1/2/19
to puppe...@googlegroups.com
Carla Curtis created an issue
 
Puppet / Bug PUP-9391
HP-UX usermod syntax is incorrect
Issue Type: Bug Bug
Assignee: Henrik Lindberg
Components: Community, Functions
Created: 2019/01/02 8:20 AM
Priority: Normal Normal
Reporter: Carla Curtis

Puppet Version:
Puppet Server Version:
OS Name/Version:

Describe your issue in as much detail as possible…
Describe steps to reproduce…

Desired Behavior:

Actual Behavior:

Please take a moment and attach any relevant log output and/or manifests. This will help us immensely when troubleshooting the issue.

Examples:
Run puppet agent with --test --trace --debug

Relevant sections of /var/log/puppetlabs/puppetserver/puppetserver.log or any applicable logs from the same directory.

For more detailed information turn up the server logs by upping the log level in the server's logback.xml

Relevant sections of configurations files (puppet.conf, hiera.conf, Server's conf.d, defaults/sysconfig)

For memory issues with server heap dumps are also helpful.

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

Carla Curtis (JIRA)

unread,
Jan 2, 2019, 11:40:03 AM1/2/19
to puppe...@googlegroups.com
Carla Curtis commented on Bug PUP-9391
 
Re: HP-UX usermod syntax is incorrect

We are deploying with 5.3.5.  I have not checked other versions for this issue.

The issue is that HP-UX forces command line arguments to usermod to be in a specific order.  Namely, the "login" must be the last argument.

In lib/puppet/provider/user/hpux.rb, the code appends a "-F" argument at the end, past the "login" parameter.

From the manpage:

====================

usermod(1M) usermod(1M)

NAME
usermod - modify a user login on the system

SYNOPSIS
usermod [-u uid [-o]] [-g group] [-G group[,group]...]
[-d dir [-m [-i]]] [-s shell] [-c comment] [-f inactive]
[-l new_logname] [-e expire] [-p encrypted_password]
[-F] [-P -S alternate_password_file] login

====================

The change we made to 
lib/puppet/provider/user/hpux.rb
to repair the error we got, was:

====================

$ diff hpux.rb.ORIG hpux.rb
27c27,31
< super.insert(1,"-F")

> cmd = super
> #puts "in deletecmd, cmd {cmd}"
> cmd.insert(1,"-F")
> #puts "in deletecmd after insert, cmd {cmd}"
> cmd
32c36,38
< cmd << "-F"

> #puts "in modifycmd, cmd {cmd}"
> cmd.insert(1,"-F")
> #puts "in modifycmd after insert, cmd {cmd}"

====================

Obviously in production one would remove the commented-out "puts" debugging.

To reproduce:

Deploy on HP-UX
(our system is at:
$ uname -a
HP-UX slc10ddl B.11.31 U ia64 4067183464 unlimited-user license
)

Deploy a new user.

cd to that user's $HOME dir in a shell (this is why the -F param is required:
-F Force the changes, even if the login is
currently in use.)

Modify something about that user, and deploy that change.

  

Josh Cooper (JIRA)

unread,
Jan 2, 2019, 12:04:02 PM1/2/19
to puppe...@googlegroups.com
Josh Cooper updated an issue
 
Change By: Josh Cooper
Team: Platform OS

Scott McClellan (JIRA)

unread,
Jan 7, 2019, 2:17:03 PM1/7/19
to puppe...@googlegroups.com
Scott McClellan assigned an issue to Geoff Nichols
Change By: Scott McClellan
Assignee: Henrik Lindberg Geoff Nichols

Carla Curtis (JIRA)

unread,
Jan 7, 2019, 3:53:04 PM1/7/19
to puppe...@googlegroups.com
Carla Curtis commented on Bug PUP-9391
 
Re: HP-UX usermod syntax is incorrect

I see the status has changed to Needs Information.  However I don't see what info is required.  
Do you need something further from me?

Carla Curtis (JIRA)

unread,
Mar 25, 2019, 1:03:04 PM3/25/19
to puppe...@googlegroups.com
Carla Curtis commented on Bug PUP-9391

We are planning to move to a newer puppet version - will this issue be fixed in this, or later, releases?

Thanks

Geoff Nichols (JIRA)

unread,
Nov 20, 2019, 5:16:04 PM11/20/19
to puppe...@googlegroups.com
Geoff Nichols assigned an issue to Henrik Lindberg
 
Change By: Geoff Nichols
Assignee: Geoff Nichols Henrik Lindberg

Geoff Nichols (JIRA)

unread,
Nov 20, 2019, 5:17:05 PM11/20/19
to puppe...@googlegroups.com
Geoff Nichols assigned an issue to Unassigned
Change By: Geoff Nichols
Assignee: Henrik Lindberg

Gheorghe Popescu (JIRA)

unread,
Nov 27, 2019, 3:07:03 AM11/27/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Team: Platform OS Night's Watch

Gheorghe Popescu (JIRA)

unread,
Nov 27, 2019, 3:07:04 AM11/27/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Sprint: PR - Triage

Gheorghe Popescu (JIRA)

unread,
Nov 27, 2019, 4:37:03 AM11/27/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Story Points: 1

Gheorghe Popescu (JIRA)

unread,
Nov 27, 2019, 5:12:03 AM11/27/19
to puppe...@googlegroups.com
Gheorghe Popescu updated an issue
Change By: Gheorghe Popescu
Sprint: PR 2019 - Triage 12-11

Luchian Nemes (JIRA)

unread,
Dec 6, 2019, 9:19:04 AM12/6/19
to puppe...@googlegroups.com
Luchian Nemes assigned an issue to Luchian Nemes
Change By: Luchian Nemes
Assignee: Luchian Nemes

Luchian Nemes (JIRA)

unread,
Dec 6, 2019, 9:19:05 AM12/6/19
to puppe...@googlegroups.com
Luchian Nemes commented on Bug PUP-9391
 
Re: HP-UX usermod syntax is incorrect

Carla Curtis I have opened a PR for this: https://github.com/puppetlabs/puppet/pull/7872. Please check and let us know if you have any further issues/questions. Thank you!

Mihai Buzgau (JIRA)

unread,
Dec 11, 2019, 4:34:08 AM12/11/19
to puppe...@googlegroups.com
Mihai Buzgau updated an issue
 
Change By: Mihai Buzgau
Sprint: 2019-12-11 , 2019-12-24

Carla Curtis (JIRA)

unread,
Dec 13, 2019, 12:22:03 PM12/13/19
to puppe...@googlegroups.com
Carla Curtis commented on Bug PUP-9391
 
Re: HP-UX usermod syntax is incorrect

Thank you!
Is there a target version(s) for this? We'd like to plan to pick it up at the next opportunity in our schedule.

Dorin Pleava (JIRA)

unread,
Jan 8, 2020, 7:11:05 AM1/8/20
to puppe...@googlegroups.com
Dorin Pleava updated an issue
 
Change By: Dorin Pleava
Fix Version/s: PUP 6.12.0
Fix Version/s: PUP 6.4.5
Fix Version/s: PUP 5.5.18

Jean Bond (JIRA)

unread,
Jan 8, 2020, 3:19:03 PM1/8/20
to puppe...@googlegroups.com
Jean Bond updated an issue
Change By: Jean Bond
Release Notes Summary: Fixed usermod command arguments order for The HP-UX provider forced command line arguments to `usermod` to be in a specific order . This is now fixed.
Reply all
Reply to author
Forward
0 new messages