Issue #17638 has been updated by eric sorenson.

Status changed from Unreviewed to Investigating
Assignee set to Nick Chappell

I think this seems reasonable, if there's >1 provider that supports it.  Feel 
like working up a patch?
----------------------------------------
Feature #17638: Ability to pass "-f" or "--force" options to user providers
https://projects.puppetlabs.com/issues/17638#change-84073

Author: Nick Chappell
Status: Investigating
Priority: Normal
Assignee: Nick Chappell
Category: provider
Target version: 
Affected Puppet version: 
Keywords: 
Branch: 


The user resource should have the ability to specify a -f or --force option for 
the various user providers so that UID/GID changes or user deletions can be 
forced even if the user has processes currently running.

It could be implemented with something like this:

<pre>
User { ‘nick’:
    ensure => absent,
    force => true,
    #the normal options for user resources would go here
}
</pre>

Currently, if a user has processes running, a user deletion fails with an error 
similar to what is below (userdel binary on RHEL/CentOS):

<pre>
puppet-agent[4217]: (/User[xxxxxx]/ensure) change from present to absent 
failed: Could not delete user xxxxxx: 
  Execution of '/usr/sbin/userdel xxxxxx' returned 8: userdel: user xxxxxx is 
currently logged in
</pre>

The errors depend on the OS-specific providers that are called by Puppet. On a 
Solaris 10 machine, sysmgr gives the following error through Puppet if there is 
a UID/GID change and the user is logged in:

<pre>
change from 1117 to 133 failed: Could not set uid on user[sysmgr]: Execution of 
'/usr/sbin/usermod -u 133 sysmgr' returned 8: usermod: user sysmgr is currently 
logged in
</pre>


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to