1diff --git a/shells/bash.go b/shells/bash.go 2index 673f4765..a58cc5e2 100644 3--- a/shells/bash.go 4+++ b/shells/bash.go 5@@ -5,6 +5,7 @@ import ( 6 "bytes" 7 "fmt" 8 "io" 9+ "os/exec" 10 "path" 11 "runtime" 12 "strconv" 13@@ -225,7 +226,11 @@ func (b *BashShell) GetConfiguration(info common.ShellScriptInfo) (script *commo 14 if info.User != "" { 15 script.Command = "su" 16 if runtime.GOOS == "linux" { 17- script.Arguments = append(script.Arguments, "-s", "/bin/"+b.Shell) 18+ shellPath, err := exec.LookPath(b.Shell) 19+ if err != nil { 20+ shellPath = "/bin/"+b.Shell 21+ } 22+ script.Arguments = append(script.Arguments, "-s", shellPath) 23 } 24 script.Arguments = append(script.Arguments, info.User) 25 script.Arguments = append(script.Arguments, "-c", shellCommand) 26-- 272.18.0 28