fix(P20): system user consistency (REQ-135, F23)
---ci--- project: orca phase: 20 milestone: v0.12 status: execute ---/ci--- Proxmox bootstrap now creates a nologin system user (-r -s /usr/sbin/nologin), matching peer-setup. Previously it created a login user (-m -s /bin/bash) with more privilege. Build + tests green.
This commit is contained in:
@@ -392,7 +392,7 @@ func deployPubKey(user, pubLine string) error {
|
||||
// createLinuxUser creates the orca system user if it doesn't already
|
||||
// exist. Idempotent: `id -u` check before `useradd`.
|
||||
func createLinuxUser(user string) error {
|
||||
cmd := fmt.Sprintf("id -u %s 2>/dev/null || useradd -m -s /bin/bash %s", user, user)
|
||||
cmd := fmt.Sprintf("id -u %s 2>/dev/null || useradd -r -s /usr/sbin/nologin %s", user, user)
|
||||
if _, err := runRemote(cmd); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user