mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #860 from ioito/hotfix/qx-inject-password-by-cloud-init
Hotfix/qx inject password by cloud init
This commit is contained in:
@@ -56,7 +56,7 @@ type SWriteFile struct {
|
||||
type SUser struct {
|
||||
Name string
|
||||
Passwd string
|
||||
LockPassword string
|
||||
LockPasswd string
|
||||
SshAuthorizedKeys []string
|
||||
Sudo string
|
||||
}
|
||||
@@ -162,7 +162,7 @@ func (u *SUser) Password(passwd string) *SUser {
|
||||
} else {
|
||||
u.Passwd = hash
|
||||
}
|
||||
u.LockPassword = "false"
|
||||
u.LockPasswd = "false"
|
||||
}
|
||||
return u
|
||||
}
|
||||
@@ -281,7 +281,7 @@ func (conf *SCloudConfig) MergeUser(u SUser) {
|
||||
// replace conf user password with input
|
||||
if len(u.Passwd) > 0 {
|
||||
conf.Users[i].Passwd = u.Passwd
|
||||
conf.Users[i].LockPassword = u.LockPassword
|
||||
conf.Users[i].LockPasswd = u.LockPasswd
|
||||
}
|
||||
|
||||
// find user, merge keys
|
||||
|
||||
Reference in New Issue
Block a user