Audit. Provision. Restrict.
A production-grade CLI toolkit for managing Linux service accounts and enforcing least-privilege shell policies at scale.
curl -sL https://raw.githubusercontent.com/saharshpamecha/userctl/main/install.sh | bashEverything you need to manage service accounts across your Linux infrastructure.
Scan all accounts. Flag service users with interactive shells. JSON/CSV/table output for CI pipelines.
userctl audit --allDeclare users in YAML. Apply state across servers. Create, update, or remove — idempotent, every time.
userctl apply -f users.yamlAuto-enforce /sbin/nologin on service accounts. One command to harden your entire fleet.
userctl restrict --autoGenerate compliance reports. SOC2-friendly. Exportable. Know your posture before the auditor does.
userctl reportFull interactive simulation — type commands or click the quick-action buttons. No install needed.
Define your desired user state in a simple YAML file. Preview changes with diff, then apply with confidence. Git-friendly, auditor-friendly.
# Declarative user config
- username: kirsty
shell: /sbin/nologin
groups: backup,monitoring
state: present
- username: deploy-bot
shell: /bin/false
groups: docker,deploy
state: present
- username: old-contractor
state: absentFrom CI pipelines to compliance audits — userctl fits into your existing stack.
Run userctl audit --format json in your pipeline. Fail the build if service accounts have interactive shells.
Combine with Ansible or SSH loops. One YAML config, consistent state across 500+ servers.
Generate reports before SOC2/ISO audits. Prove least-privilege shell policy enforcement.
Declarative user lifecycle. Add to YAML on join, set state: absent on exit. Version-controlled.
Single-file Bash script. No dependencies. Works on any Linux distro.
Option 1 — Quick install
$ curl -sL https://raw.githubusercontent.com/saharshpamecha/userctl/main/install.sh | bashOption 2 — Manual
$ git clone https://github.com/saharshpamecha/userctl.git
$ chmod +x userctl/cli/userctl
$ sudo cp userctl/cli/userctl /usr/local/bin/