Skip to content

Commit f777995

Browse files
committed
CLOUD-57217 disable shell for saltuser with /sbin/nologin
1 parent 7c354f5 commit f777995

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
BINARY=salt-bootstrap
22

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

saltboot/user.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func CreateUser(saltMaster SaltMaster) (resp model.Response, err error) {
4444
if err != nil {
4545
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err
4646
}
47-
result, err = ExecCmd("adduser", "-G", "wheel", "-s", "/bin/false", "--password", hash, SALT_USER)
47+
result, err = ExecCmd("adduser", "-G", "wheel", "-s", "/sbin/nologin", "--password", hash, SALT_USER)
4848

4949
if err != nil {
5050
return model.Response{ErrorText: err.Error(), StatusCode: http.StatusInternalServerError}, err

0 commit comments

Comments
 (0)