lock_passwd (default_user) vs lock-passwd (normal user)

Bug #1521554 reported by Jan Collijs
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cloud-init
Expired
Medium
Unassigned

Bug Description

In our use case we only have one user we create with the cloud-init configuration file. We need a password set for this user so we configured him as the default_user as follows:

system_info:
  default_user:
   name: demo
     passwd: PASSWORDHASH
     shell: /bin/bash
     lock-passwd: False

But the password was always locked over and over again.

After some troubleshooting I figured the lock param was wrong. Apparently for a normal user it's lock-passwd (with a hyphen) but for the default user it's lock_passwd (with an underscore)

To me this was very confusing and I lost a lot of time on this little difference. Is there any particular reason why the differ? Wouldn't it be a better idea to streamline them using only one of the two options for both?

Revision history for this message
Scott Moser (smoser) wrote :

So the reason for this is somewhat historical.
You should be able to use 'lock_passwd' for either case, but lock-passwd will only affect non-default users.

Changed in cloud-init:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
James Falcon (falcojr) wrote :
Changed in cloud-init:
status: Confirmed → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.