[rhinstaller/anaconda/pulls/442 f23-branch] Add --sshkey to kickstart sshpw command
vpodzime
installerbot-noreply at redhat.com
Tue Nov 10 08:23:35 UTC 2015
> @@ -46,9 +46,15 @@ u = users.Users()
> userdata = ksparser.handler.sshpw.dataList()
> for ud in userdata:
> if u.checkUserExists(ud.username, root="/"):
> - u.setUserPassword(username=ud.username, password=ud.password,
> - isCrypted=ud.isCrypted, lock=ud.lock)
> + if not ud.sshkey:
> + u.setUserPassword(username=ud.username, password=ud.password,
> + isCrypted=ud.isCrypted, lock=ud.lock)
> else:
> kwargs = ud.__dict__
> kwargs.update({"root": "/"})
> u.createUser(ud.username, **kwargs)
> +
> + if ud.sshkey:
> + # Setup the account so that only the sshkey can be used
> + u.setUserPassword(username=ud.username, password="*", isCrypted=True, lock=False)
> + u.setUserSshKey(username=ud.username, key=ud.password, root="/")
should the key here really be ``ud.password``? I'd expect it to be ``ud.sshkey``.
--
To view this pull request on github, visit https://github.com/rhinstaller/anaconda/pull/442#discussion_r44379754
More information about the anaconda-patches
mailing list