Issue #11111 has been updated by Joshua Lifton.

Status changed from Unreviewed to Needs More Information
Assignee set to Joshua Lifton

I couldn't replicate this issue by removing the newline at the end of 
<code>/etc/shadow</code> on a Debian 5.0 VM with a fresh installation of Puppet 
Enterprise 2.0.0. Steve, are you able to put together a reproducible case? 
Here's what I did:

<pre>
agent2:~# puppet --version
2.7.6 (Puppet Enterprise 2.0.0)

agent2:~# ls -l /etc/shadow*
-rw-r--r-- 1 root root 730 2011-12-07 22:38 /etc/shadow
-rw------- 1 root root 730 2011-12-07 22:38 /etc/shadow-
agent2:~# diff /etc/shadow /etc/shadow-
agent2:~# head -c 729 /etc/shadow > /etc/shadow.nonewline

agent2:~# diff /etc/shadow /etc/shadow.nonewline 
26c26
< pe-puppet:*:15315:0:99999:7:::
---
> pe-puppet:*:15315:0:99999:7:::
\ No newline at end of file

agent2:~# mv /etc/shadow.nonewline /etc/shadow
agent2:~# cp /etc/shadow /etc/shadow-

agent2:~# ls -l /etc/shadow*
-rw-r--r-- 1 root root 729 2011-12-07 22:41 /etc/shadow
-rw------- 1 root root 729 2011-12-07 22:42 /etc/shadow-

agent2:~# puppet resource user no_such_user ensure=absent
user { 'no_such_user':
  ensure => 'absent',
}
agent2:~#
</pre>
----------------------------------------
Bug #11111: Puppet incorrectly thinks user exists when it does not
https://projects.puppetlabs.com/issues/11111

Author: Steve Shipway
Status: Needs More Information
Priority: Normal
Assignee: Joshua Lifton
Category: agent
Target version: 
Affected Puppet version: 2.7.6
Keywords: 
Branch: 


I have a normal resource definition to ensure the user 'steves' does not exist. 
 On one puppet client, even though the user definitely does not exist, puppet 
still tries to remove it giving this error:

change from present to absent failed: Could not delete user steves: Execution 
of '/usr/sbin/userdel steves' returned 6: userdel: user steves does not exist 

user { steves: ensure=>absent; }

Why is the puppet agent still trying to delete the user when it definitely is 
not there?  I have checked /etc/shadow, /etc/passwd and /etc/group and it is 
not mentioned in any of them.

This also affects another user, but not every one!  I have a list of about six 
that are deleted if found on all hosts, but on this host only two of them 
result in this error.

Puppet agent is running on Linux RHEL5 32bit.



-- 
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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to