Skip to content

2.7.x - fix for password setting on AIX user provider#585

Merged
kelseyhightower merged 1 commit intopuppetlabs:2.7.xfrom
andytinycat:2.7.x
Jul 17, 2012
Merged

2.7.x - fix for password setting on AIX user provider#585
kelseyhightower merged 1 commit intopuppetlabs:2.7.xfrom
andytinycat:2.7.x

Conversation

@andytinycat
Copy link

The user provider on AIX fails to set the password for local users
using chpasswd.

This commit includes the code in ticket #11200 suggested by Josh
Cooper. It works in my environment (AIX 5.3 + 6.1).

chpasswd can also return 1 even on success; it's not clear if this is
by design, as the manpage doesn't mention it. The lack of output from
chpasswd indicates success; if there's a problem it dumps output to
stderr/stdout.

The user provider on AIX fails to set the password for local users
using chpasswd.

This commit includes the code in ticket #11200 suggested by Josh
Cooper. It works in my environment (AIX 5.3 + 6.1).

chpasswd can also return 1 even on success; it's not clear if this is
by design, as the manpage doesn't mention it. The lack of output from
chpasswd indicates success; if there's a problem it dumps output to
stderr/stdout.
@kelseyhightower
Copy link

@andytinycat Thanks for the patch! Also can you include some updated spec tests for this change?

@andytinycat
Copy link
Author

@kelseyhightower I'm not familiar with unit testing in Ruby, but I guess this is a good opportunity to learn.

From what I can see, there are no unit tests for the AIX user provider at all; which means writing a full set of tests to validate its behaviour. Is that acceptable within a single pull, or should I split the tests up into a new ticket+pull pair?

@kelseyhightower
Copy link

@andytinycat A single pull requests works for me. If you get stuck writing the unit tests let me know.

@kelseyhightower
Copy link

This patch is a hard one to test indeed. Overall the code looks ok and I cannot think of a better way to do this.

kelseyhightower pushed a commit that referenced this pull request Jul 17, 2012
2.7.x - fix for password setting on AIX user provider
@kelseyhightower kelseyhightower merged commit eb31584 into puppetlabs:2.7.x Jul 17, 2012
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.

2 participants