config/system: add shell user attribute

This adds support for specifying the login shell of created users.
This commit is contained in:
Richard Marshall
2015-03-06 14:16:19 -08:00
parent 66a2f00679
commit f5ecc05d62
3 changed files with 10 additions and 0 deletions

View File

@@ -72,6 +72,10 @@ func CreateUser(u *config.User) error {
args = append(args, "--no-log-init")
}
if u.Shell != "" {
args = append(args, "--shell", u.Shell)
}
args = append(args, u.Name)
output, err := exec.Command("useradd", args...).CombinedOutput()