Jeff Falgout
2007-May-10 17:28 UTC
Bug or misconfiguration? Trying to add local user in NIS environment
Hello - Is the following a configuration issue (which is usually the case) or a bug? I''m trying to ensure a local user is present in a NIS environment using the following recipie: class dduck_add { user { "dduckl": ensure => present, uid => 60030, gid => "100", groups => "users", home => "/dduck", managehome => true, provider => useradd, password => "{CRYPT}al;ksdjfII" } } But I''m getting the following error (It''s trying to modify the NIS user): # puppetd -vt --verbose --factsync info: Loading fact suse info: Retrieving facts info: Loading fact suse notice: Ignoring cache info: Caching configuration at /var/lib/puppet/localconfig.yaml notice: Starting configuration run err: //global/super_add/User[dduck]/groups: change from dialout,video,super to dialout,dduck,users,video failed: Could not set groups on user[dduck]: Execution of ''/usr/sbin/usermod -G dialout,dduck,users,video super'' returned #<Process::Status: pid=1425,exited(10)>: usermod: `users'' is primary group name. Cannot modify/add NIS group entries. usermod: User not removed from group `dduck''. Cannot modify/add NIS group entries. usermod: User not added to LDAP group `dduck''. notice: Finished configuration run in 6.44 seconds The default for useradd, usermod, etc is to use files unless the --service flag is set. Facter: architecture => i386 domain => example.com facterversion => 1.3.6 fqdn => puppetserver.example.com hardwareisa => i686 hardwaremodel => i686 hostname => puppetserver id => root ipaddress => 10.10.10.15 kernel => Linux kernelrelease => 2.6.16.27-0.9-bigsmp macaddress => 00:10:18:17:BF:E6 00:10:17:17:BF:E6 00:10:18:18:BF:E6 00:10:18:16:BF:D5 00:10:18:17:BF:E6 00:14:5E:69:80:8D memoryfree => 5.26 GB memorysize => 5.94 GB operatingsystem => SuSE operatingsystemrelease => 2.6.16.27-0.9-bigsmp processor0 => Intel(R) Xeon(TM) CPU 2.80GHz processor1 => Intel(R) Xeon(TM) CPU 2.80GHz processor2 => Intel(R) Xeon(TM) CPU 2.80GHz processor3 => Intel(R) Xeon(TM) CPU 2.80GHz processor4 => Intel(R) Xeon(TM) CPU 2.80GHz processor5 => Intel(R) Xeon(TM) CPU 2.80GHz processor6 => Intel(R) Xeon(TM) CPU 2.80GHz processor7 => Intel(R) Xeon(TM) CPU 2.80GHz processorcount => 8 ps => ps -ef puppetversion => 0.22.4 rubysitedir => /usr/lib/ruby/site_ruby/1.8 rubyversion => 1.8.4 sshdsakey => AAAAB3NzaC1kc3MAAACBAN/gekgppHT+IrwOqAHsou/Z5ykIF83UiAUbBTQ7yuP1PWyE9/Jz4itjIr3U6BVtwy0SEmiRmPAbyP+Atov0FaUkdL/Fa74m5H+lp42crOQeYQsARPOEgwK7+W4t4zF6o7Xz5M0wAoLEKu4+Vxkj1WMR7dBsLJQBlUGWo1Qwr/hlAAAAFQDttPulTbdZFRp5eyytn7L3A9jKCQAAAIB1ny46tEgQWPgcz6XKmdSt+Q3DVxRi96HLfLLf+p6h38BYB7dRQ/Y0RUlbk/cDNBsyZ5MmFzlrh94nsjloToypuisDjq6jDe0Wq4mTPLvWBf6kvsH5hhFcISvMMloPxAR5620jLvbA92pw1HNgRxhd7hqBUNDg16KBy7VQD5gDLAAAAIAywmVwfDoM8/txVR6mCydwdNxZUf5Nlx8hEkN/5YX7CS42aJGwwP1IQWtiHjezV6gt9y4nHM+SPnzxMCzovC+jmZ6PnV6j2wi25gBlIj4yZfnY9XJa7XTsafdNTBcfk/JSuWvab81fLtDZQQrTeXesHxewMH2q1RbMHoM470tt2g=sshrsakey => AAAAB3NzaC1yc2EAAAABIwAAAIEArAjMAmaG8JrEhCIEl8nlHnH5qyqwr+TRETtdrhBOBa0g0WwTxRnPTjQ98u2p32zuQWtXKrx2D49/BCp67poJY4FPbfpljvHFbb0N9/N80uu5ew3SGj4+qseJCT+yC+3ngD+qsT4mAxkMcAsqD+f15iKMlA3KXeibak8olkoyZTMsuse_arch => i586 suse_repo_name => sles10-i586 suse_version => sles10 swapfree => 2.00 GB swapsize => 2.00 GB uniqueid => 0x730a0f10 Guidance is greatly appreciated!! Jeff
Luke Kanies
2007-May-11 16:07 UTC
Re: Bug or misconfiguration? Trying to add local user in NIS environment
On May 10, 2007, at 12:28 PM, Jeff Falgout wrote:> > But I''m getting the following error (It''s trying to modify the NIS > user): > > # puppetd -vt --verbose --factsync > info: Loading fact suse > info: Retrieving facts > info: Loading fact suse > notice: Ignoring cache > info: Caching configuration at /var/lib/puppet/localconfig.yaml > notice: Starting configuration run > err: //global/super_add/User[dduck]/groups: change from > dialout,video,super to dialout,dduck,users,video failed: Could not set > groups on user[dduck]: Execution of ''/usr/sbin/usermod -G > dialout,dduck,users,video super'' returned #<Process::Status: > pid=1425,exited(10)>: usermod: `users'' is primary group name. > Cannot modify/add NIS group entries. > usermod: User not removed from group `dduck''. > Cannot modify/add NIS group entries. > usermod: User not added to LDAP group `dduck''.I assume you''re sure that the main group ID is right for the user? That seems like a problem here, too.> notice: Finished configuration run in 6.44 seconds > > > The default for useradd, usermod, etc is to use files unless the > --service flag is set.Puppet''s certainly not telling it to use NIS, so usermod is itself doing it, for some reason. Is your goal to modify NIS, or not? -- A child can go only so far in life without potty training. It is not mere coincidence that six of the last seven presidents were potty trained, not to mention nearly half of the nation''s state legislators. -- Dave Barry --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com
Jeff Falgout
2007-May-14 17:28 UTC
Re: Bug or misconfiguration? Trying to add local user in NIS environment
On 5/11/07, Luke Kanies <luke@madstop.com> wrote:> On May 10, 2007, at 12:28 PM, Jeff Falgout wrote: > > > > But I''m getting the following error (It''s trying to modify the NIS > > user): > > > > # puppetd -vt --verbose --factsync > > info: Loading fact suse > > info: Retrieving facts > > info: Loading fact suse > > notice: Ignoring cache > > info: Caching configuration at /var/lib/puppet/localconfig.yaml > > notice: Starting configuration run > > err: //global/super_add/User[dduck]/groups: change from > > dialout,video,super to dialout,dduck,users,video failed: Could not set > > groups on user[dduck]: Execution of ''/usr/sbin/usermod -G > > dialout,dduck,users,video super'' returned #<Process::Status: > > pid=1425,exited(10)>: usermod: `users'' is primary group name. > > Cannot modify/add NIS group entries. > > usermod: User not removed from group `dduck''. > > Cannot modify/add NIS group entries. > > usermod: User not added to LDAP group `dduck''. > > I assume you''re sure that the main group ID is right for the user? > That seems like a problem here, too.It''s not only failing on the main group ID, but anything that needs to be changed: err: //global/dduck_add/User[dduck]/home: change from /tmp to /dduck failed: Could not set home on user[dduck]: Execution of ''/usr/sbin/usermod -d /dduck dduck'' returned #<Process::Status: pid=8736,exited(3)>: Error while changing the NIS data.> > > notice: Finished configuration run in 6.44 seconds > > > > > > The default for useradd, usermod, etc is to use files unless the > > --service flag is set. > > Puppet''s certainly not telling it to use NIS, so usermod is itself > doing it, for some reason. Is your goal to modify NIS, or not?yeah - it''s just calling the systems usermod. I just want to ensure that the user exists locally on the system (files). I specifically don''t want want to modify NIS. Thanks, Jeff
Jeff Falgout
2007-May-14 18:39 UTC
Re: Bug or misconfiguration? Trying to add local user in NIS environment
On 5/14/07, Jeff Falgout <jtfalgout@gmail.com> wrote:> On 5/11/07, Luke Kanies <luke@madstop.com> wrote: > > On May 10, 2007, at 12:28 PM, Jeff Falgout wrote: > > > > > > But I''m getting the following error (It''s trying to modify the NIS > > > user): > > > > > > # puppetd -vt --verbose --factsync > > > info: Loading fact suse > > > info: Retrieving facts > > > info: Loading fact suse > > > notice: Ignoring cache > > > info: Caching configuration at /var/lib/puppet/localconfig.yaml > > > notice: Starting configuration run > > > err: //global/super_add/User[dduck]/groups: change from > > > dialout,video,super to dialout,dduck,users,video failed: Could not set > > > groups on user[dduck]: Execution of ''/usr/sbin/usermod -G > > > dialout,dduck,users,video super'' returned #<Process::Status: > > > pid=1425,exited(10)>: usermod: `users'' is primary group name. > > > Cannot modify/add NIS group entries. > > > usermod: User not removed from group `dduck''. > > > Cannot modify/add NIS group entries. > > > usermod: User not added to LDAP group `dduck''. > > > > I assume you''re sure that the main group ID is right for the user? > > That seems like a problem here, too. > > It''s not only failing on the main group ID, but anything that needs to > be changed: > > err: //global/dduck_add/User[dduck]/home: change from /tmp to /dduck > failed: Could not set home on user[dduck]: Execution of > ''/usr/sbin/usermod -d /dduck dduck'' returned #<Process::Status: > pid=8736,exited(3)>: Error while changing the NIS data. > > > > > > notice: Finished configuration run in 6.44 seconds > > > > > > > > > The default for useradd, usermod, etc is to use files unless the > > > --service flag is set. > > > > Puppet''s certainly not telling it to use NIS, so usermod is itself > > doing it, for some reason. Is your goal to modify NIS, or not? > > yeah - it''s just calling the systems usermod. > > I just want to ensure that the user exists locally on the system > (files). I specifically don''t want want to modify NIS. >Well, this seems to be a problem only on SLES10 - SLED10 and SLES9 do not have this problem - usermod and puppet work correctly on them. Sigh . . . .Move along, nothing to see here. . . . .