Fix up user configuration in install image

We use cloud-init to create the initial user on the target system.
Ensure the password login works, that it has a shell (/bin/bash)
and sudo privs via group admin.

Signed-off-by: Ryan Harper <ryan.harper@canonical.com>
This commit is contained in:
Ryan Harper 2015-09-21 13:17:24 -05:00
parent e888b13707
commit 0beb904448
1 changed files with 4 additions and 1 deletions

View File

@ -124,7 +124,10 @@ late_commands:
def curtin_userinfo_to_config(userinfo): def curtin_userinfo_to_config(userinfo):
user_template = ' - name: {username}\\n' + \ user_template = ' - name: {username}\\n' + \
' gecos: {realname}\\n' + \ ' gecos: {realname}\\n' + \
' passwd: {password}\\n' ' passwd: {password}\\n' + \
' shell: /bin/bash\\n' + \
' groups: admin\\n' + \
' lock-passwd: false\\n'
return user_template.format(**userinfo) return user_template.format(**userinfo)