mirror of
https://github.com/k3s-io/k3s.git
synced 2024-06-07 19:41:36 +00:00
Fix node-passwd on upgrade missing 3 columns
This commit is contained in:
parent
c736888e12
commit
eff502342a
@ -44,8 +44,8 @@ func Read(file string) (*Passwd, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if len(record) < 3 {
|
||||
return nil, fmt.Errorf("password file '%s' must have at least 3 columns (password, user name, user uid), found %d", file, len(record))
|
||||
if len(record) < 2 {
|
||||
return nil, fmt.Errorf("password file '%s' must have at least 2 columns (password, name), found %d", file, len(record))
|
||||
}
|
||||
e := entry{
|
||||
pass: record[0],
|
||||
|
Loading…
Reference in New Issue
Block a user