Skip to content

Commit

Permalink
CLOUD-57217 disable shell for saltuser
Browse files Browse the repository at this point in the history
  • Loading branch information
akanto committed Aug 25, 2016
1 parent b9d711c commit 7c354f5
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 21 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
BINARY=salt-bootstrap

VERSION=0.2.0
VERSION=0.2.1
BUILD_TIME=$(shell date +%FT%T)
LDFLAGS=-ldflags "-X github.com/sequenceiq/salt-bootstrap/saltboot.Version=${VERSION} -X github.com/sequenceiq/salt-bootstrap/saltboot.BuildTime=${BUILD_TIME}"

Expand Down
15 changes: 0 additions & 15 deletions saltboot/salt_test.go

This file was deleted.

6 changes: 1 addition & 5 deletions saltboot/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@ func CreateUser(saltMaster SaltMaster) (resp model.Response, err error) {
if err != nil {
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err
}
result, err = ExecCmd("adduser", "--password", hash, SALT_USER)
result, err = ExecCmd("adduser", "-G", "wheel", "-s", "/bin/false", "--password", hash, SALT_USER)

if err != nil {
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err
}
result, err = ExecCmd("usermod", "-G", "wheel", SALT_USER)
if err != nil {
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err
}
} else {
log.Printf("[CreateUser] user: %s exsist", SALT_USER)
}
Expand Down

0 comments on commit 7c354f5

Please sign in to comment.