Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement planned features #1

Merged
merged 36 commits into from
Jun 11, 2018
Merged

Implement planned features #1

merged 36 commits into from
Jun 11, 2018

Conversation

ymmt2005
Copy link
Member

No description provided.

@ymmt2005 ymmt2005 changed the title cli Implement planned features Jun 11, 2018
agent/sync.go Outdated
})
}

// remove users
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ユーザの primary group になっている group は消せないので、
remove users は remove groups より前にやった方がよさそう。

$ sudo groupadd aaa
$ sudo groupadd bbb
$ sudo useradd -g aaa -G bbb -m foo
$ id foo
uid=1001(foo) gid=1002(aaa) groups=1002(aaa),1003(bbb)
$ sudo groupdel aaa
groupdel: cannot remove the primary group of user 'foo'
$ sudo groupdel bbb
# supplementary group を消すのは成功する
$ id foo
uid=1001(foo) gid=1002(aaa) groups=1002(aaa)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

確かに。

auth.go Outdated
}

return cmd.CommandContext(ctx, "userdel", "--force", username).Run()
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ファイルごと消してくだち。

- `group remove NAME`
- `locker list`
- `locker lock NAME`
- `locker unlock NAME`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ここも add/remove で。

cli/user.go Outdated
f.StringVar(&c.displayName, "display", "", "display name")
f.StringVar(&c.group, "group", "", "primary group")
f.Var(&c.groups, "groups", "comma-separated supplementary groups")
f.StringVar(&c.shell, "shell", etcdpasswd.DefaultShell, "shell program")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

デフォルトシェルは設定で切り替えられるので、フラグのデフォルト値としては group, groups 同様に空文字列が良いかと。

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

そうします。

Copy link
Contributor

@morimoto-cybozu morimoto-cybozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@morimoto-cybozu morimoto-cybozu merged commit b567913 into master Jun 11, 2018
@morimoto-cybozu morimoto-cybozu deleted the dev branch June 11, 2018 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants