A terminal user interface (TUI) to view and manage UNIX users and groups.
- Browse system users and groups with fuzzy search
- View user details (UID, GID, home directory, group memberships)
- View group details and member lists
- Account status badges β β
active, π locked,
β οΈ expiring β visible in the user list - Last login display in user detail view
- System user filter β press
sto toggle system accounts (UID < 1000) - Create new users with custom shell and password or SSH key authentication
- Delete users and their home directory (
userdel -r) - Lock/unlock users to revoke or restore access (
usermod --lock/--unlock) - Set account expiry for time-limited access (
chage --expiredate) - Add/remove users from groups for role-based access (
usermod -aG,gpasswd -d) - Create/delete groups to define roles (
groupadd,groupdel) - View password aging info (
chage -l) - Command preview β see the exact command before confirming destructive actions
- Audit log β all actions logged to
/var/log/ugm-audit.logwith timestamp and operator
- Linux, FreeBSD, OpenBSD, or NetBSD
- Go 1.25+ (to build from source)
- Root privileges β run with
sudo ugm
go install github.com/mrofisr/ugm-tui/cmd/ugm@latestDownload a prebuilt binary from releases.
sudo ugm| Key | Description |
|---|---|
Ctrl+c / q / Esc |
Exit |
Tab |
Switch between user and group view |
β / k |
Previous item |
β / j |
Next item |
β / h |
Previous page |
β / l |
Next page |
/ |
Search |
Enter |
Apply search |
m |
Manage selected user |
s |
Toggle system users (UID < 1000) |
Press m on a selected user to open the management menu:
| Action | Description |
|---|---|
| Create New User | Create a user with a custom shell. Authenticate via password or SSH public key. |
| Delete User | Remove user and their home directory (userdel -r). |
| Lock User | Disable login via usermod --lock (revoke access). |
| Unlock User | Re-enable login via usermod --unlock. |
| Set Expiry Date | Set account expiry via chage --expiredate. The OS locks the account automatically when expired. |
| Add to Group | Assign a role by adding user to a group (usermod -aG). |
| Remove from Group | Revoke a role by removing user from a group (gpasswd -d). |
| View Password Aging | Display password aging info via chage -l. |
| Create Group | Create a new group/role (groupadd). |
| Delete Group | Remove a group (groupdel). |
| Key | Description |
|---|---|
β / k |
Previous menu item |
β / j |
Next menu item |
Enter |
Select action / Submit form |
Tab |
Next field (in forms) / Toggle auth method |
y / n |
Confirm / Cancel (delete, lock, unlock) |
Esc |
Back to previous view |
All management actions are logged to /var/log/ugm-audit.log:
2026-04-09T16:30:00+07:00 operator=abdur action=create-user target=rafi useradd -m -s /bin/bash rafi
2026-04-09T16:31:00+07:00 operator=abdur action=lock target=rafi usermod --lock rafi
The operator is detected from $SUDO_USER.
go install mvdan.cc/gofumpt@latest
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latestmake buildmake fmt # format with gofumpt
make lint # run golangci-lint
make fix # auto-fix lint issues
make all # fmt + fix + build.
βββ cmd/ugm/main.go # Entry point, root check, OS check
βββ internal/
βββ passwd/ # Parses /etc/passwd
βββ group/ # Parses /etc/group
βββ usermgmt/ # User management (create, delete, lock, unlock,
β # expiry, groups, SSH keys, password aging)
βββ audit/ # Action audit logging
βββ tui/
βββ tui.go # Root model, state management
βββ style.go # Shared styles
βββ userview.go # User list view
βββ groupview.go # Group list view
βββ manageview.go # Management actions
ugm only works on UNIX-based operating systems (Linux, FreeBSD, OpenBSD, NetBSD).
On macOS, the information reported will not be accurate. The tool relies on /etc/passwd and /etc/group, which are only consulted in single-user mode. macOS uses Directory Services to manage users and groups.
- Bubble Tea v2 β TUI framework
- Bubbles v2 β TUI components (list, viewport, table, text input)
- Lip Gloss v2 β Terminal styling and layout
See CONTRIBUTING.md for guidelines.
See CODE_OF_CONDUCT.md.
See SECURITY.md for the security policy.