[PUP-1949] Add user_attributes type (only modifies existing users) Created: 2014/03/14  Updated: 2017/05/18  Resolved: 2017/05/16

Status: Closed
Project: Puppet
Component/s: Types and Providers
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Tim Diels Assignee: Kylo Ginsberg
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

QA Contact: Eric Thompson


To avoid a too coarse dependency, I suggest addition of the following type: user_attributes. It allows modifying existing users, but never creates/deletes them.

This then allows e.g.:

class shell {
  file {'/etc/zshrc':
    ensure => 'present',
    owner => 'root',
class shell::user {
  require shell
  user_attributes {'root':
    shell => '/bin/zsh',
include shell::user

If we had used the user type here, this would have caused a cyclic dependency.

Detail: user_attributes has more or less the same attributes as user type, minus ensure and any other attributes related to user creation.

Comment by Tim Diels [ 2014/03/14 ]

On second thought, this can be resolved with an exec

{ 'chsh'}

, and for most attributes it can be resolved with exec


. Those are sufficiently cross-platform for my needs.

If adding anything, it'd probably be better to go with a type per attribute: user_shell_attr, user_group_membership, ... to encapsulate the cross-platform provisions.

Comment by Maggie Dreyer [ 2017/05/16 ]

Thank you for filing this issue. However, we believe this change represents a technical direction that we have decided not to follow in Puppet. As such, we are closing this as “Won’t Do”. If any watcher believes this is an error, please add a comment explaining.

Generated at Wed Aug 21 00:32:46 PDT 2019 using JIRA 7.7.1#77002-sha1:e75ca93d5574d9409c0630b81c894d9065296414.