Interview Prep/Linux/Users, groups and access control

A team wants a shared Git deploy user on the server, but you need to know who deployed. How do you design it?

IntermediateScenarioUsers, groups and access control
Answer

Situation read → Shared account, individual identity.

What I'd do →

  1. Put each person's key in ~deploy/.ssh/authorized_keys with a forced command and env tag:
command="/usr/local/bin/deploy-wrapper alice",no-port-forwarding,no-pty ssh-ed25519 AAAA... alice
  1. The wrapper logs alice plus $SSH_ORIGINAL_COMMAND to syslog and runs only allowed actions.
  2. sshd also logs the key fingerprint per login (LogLevel VERBOSE).

Why → You keep a single deploy account but every action is tied to a key owner.

Interview tip → Better long-term answer: deploy from CI with a dedicated identity, not humans over SSH.

All Linux questions Roadmap: Linux

More on Users, groups and access control