- From: Jacob Vanderdray <
>
- To:
- Subject: [chef] Locking User Accounts
- Date: Mon, 1 Nov 2010 15:41:10 -0400
I'm working on making the users cookbook work for doing more general
user management. I've created a default recipe and I've got it now adding
users defined in a data bag (even if they aren't in the sysadmin group). I
want to be able to lock accounts, so I've added a "locked" attribute to the
data bag entries. I also added the following to my recipe:
# Lock or unlock the account
user u['id'] do
if u['locked'] then
action :lock
else
action :unlock
end
end
I'm not getting any errors, but when I set the lock attribute to true
on an entry and run chef-client in debug mode it reports:
[Mon, 01 Nov 2010 12:20:30 -0700] DEBUG: No need to lock user[jvanderdray]
Any pointers appreciated.
Thanks,
JAke.
- [chef] Locking User Accounts, Jacob Vanderdray, 11/01/2010
Archive powered by MHonArc 2.6.16.