Issue #6824 has been updated by Douglas Fraser.

On RHEL/CentOS 5 changing the maximum_uid setting (to 4294967294) seems to 
simply expose an underlying bug in the distribution ruby libraries.

The resultant error is

    (err): Could not evaluate: integer 4294967294 too big to convert to `int'


This appears to come from use of the etc module getpwuid method. As so

    $ ruby -r etc -e 'nobody = Etc.getpwuid(4294967294); p nobody'
    -e:1:in `getpwuid': integer 4294967294 too big to convert to `int' 
(RangeError)
    from -e:1

(compare to RHEL 6 
    ruby -r etc -e 'nobody = Etc.getpwuid(4294967294); p nobody'
    -e:1:in `getpwuid': can't find user for -2 (ArgumentError)
    from -e:1
where, disregarding error about non-existent account, it understands 4294967294 
is -2)

an where getpwnam return looks like:

    $ ruby -r etc -e 'nobody = Etc.getpwnam("nfsnobody"); p nobody'
    #<struct Struct::Passwd name="nfsnobody", passwd="x", uid=4294967294, 
gid=4294967294, gecos="Anonymous NFS User", dir="/var/lib/nfs", 
shell="/sbin/nologin">

I had considered suggesting a fix of adding nfsnobody to the system_users array 
at the end of the resources type but researching this a bit further I 
discovered that in RHEL 6 this is arguably no longer an issue with regard to 
nfsnobody account as they have set the 64bit architecture default to 65534 and 
this looks like it might be making it way back to RHEL 5 for 5.7, see 
https://bugzilla.redhat.com/show_bug.cgi?id=511876





----------------------------------------
Bug #6824: Cannot manage account for user nfsnobody: "tried to get name field 
for silly id 4294967294"
https://projects.puppetlabs.com/issues/6824

Author: Jacek Masiulaniec
Status: Needs More Information
Priority: Normal
Assignee: Nigel Kersten
Category: Red Hat
Target version: 
Affected Puppet version: 2.6.6
Keywords: 
Branch: 
Affected Dashboard version: 


I'd like to receive userdel suggestions for unmanaged users:

        resources { 'user':
                noop               => true,
                purge              => true,
                unless_system_user => true,
        }

On default CentOS install, there is single non-system user:

        nfsnobody:x:4294967294:4294967294:Anonymous NFS 
User:/var/lib/nfs:/sbin/nologin

which would, roughly, translate to:

        user {
                'nfsnobody': uid => 4294967294, gid => 4294967294;
        }

However, this triggers buggy warning:

[root@localhost puppet]# puppet agent --test --noop
info: Caching catalog for localhost.localdomain
info: Applying configuration version '1300966851'
err: Tried to get name field for silly id 4294967294
notice: /Stage[main]//Node[default]/User[nfsnobody]/gid: current_value 
4294967294, should be 4294967294 (noop)
notice: Finished catalog run in 0.42 seconds
[root@localhost puppet]# 


-- 
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