All Projects → illiliti → ssu

illiliti / ssu

Licence: GPL-3.0 license
Extremely simple su utility

Programming Languages

c
50402 projects - #5 most used programming language
Roff
2310 projects
Makefile
30231 projects

Projects that are alternatives of or similar to ssu

suex
execute commands as another user
Stars: ✭ 39 (-30.36%)
Mutual labels:  sudo, doas
Sudo
Development repository for sudo cookbook
Stars: ✭ 113 (+101.79%)
Mutual labels:  sudo
Ansible Role Security
Ansible Role - Security
Stars: ✭ 398 (+610.71%)
Mutual labels:  sudo
Sudo rails
🔒 Sudo mode for your Rails controllers
Stars: ✭ 66 (+17.86%)
Mutual labels:  sudo
Freeipa
Mirror of FreeIPA, an integrated security information management solution
Stars: ✭ 520 (+828.57%)
Mutual labels:  sudo
Elevate
Python library for requesting root privileges
Stars: ✭ 74 (+32.14%)
Mutual labels:  sudo
Electron Sudo
Electron subprocesses with administrative privileges, prompting the user with an OS dialog if necessary.
Stars: ✭ 336 (+500%)
Mutual labels:  sudo
sudosh
Shell wrapper to run a login shell with `sudo` as the current user for the purpose of audit logging
Stars: ✭ 87 (+55.36%)
Mutual labels:  sudo
Awesome Terminal Commands
An awesome resource listing and explaining various commonly used *nix commands
Stars: ✭ 109 (+94.64%)
Mutual labels:  sudo
Sudo pair
Plugin for sudo that requires another human to approve and monitor privileged sudo sessions
Stars: ✭ 1,077 (+1823.21%)
Mutual labels:  sudo
Sudo killer
A tool to identify and exploit sudo rules' misconfigurations and vulnerabilities within sudo for linux privilege escalation.
Stars: ✭ 1,073 (+1816.07%)
Mutual labels:  sudo
Sudo
sudo for windows
Stars: ✭ 648 (+1057.14%)
Mutual labels:  sudo
Castle Winbuntu
Homesick Castle for use on WSL.
Stars: ✭ 87 (+55.36%)
Mutual labels:  sudo
Gbt
Highly configurable prompt builder for Bash, ZSH and PowerShell written in Go.
Stars: ✭ 457 (+716.07%)
Mutual labels:  sudo
Sudo
Order bash to do things by shouting.
Stars: ✭ 155 (+176.79%)
Mutual labels:  sudo
Impost3r
👻Impost3r -- A linux password thief
Stars: ✭ 355 (+533.93%)
Mutual labels:  sudo
Gsudo
A Sudo for Windows - run elevated without spawning a new Console Host Window
Stars: ✭ 1,016 (+1714.29%)
Mutual labels:  sudo
Gtfonow
Automatic privilege escalation for misconfigured capabilities, sudo and suid binaries
Stars: ✭ 68 (+21.43%)
Mutual labels:  sudo
fakesudo
sudo almost as fake as your ma
Stars: ✭ 15 (-73.21%)
Mutual labels:  sudo
Suda.vim
🥪 An alternative sudo.vim for Vim and Neovim, limited support sudo in Windows
Stars: ✭ 247 (+341.07%)
Mutual labels:  sudo

ssu

Extremely simple su utility

Dependencies

  • C99 compiler (gcc, clang, tcc, cproc, ...) (build time)
  • POSIX make (gmake, bmake, smake, pdpmake, ...) (build time)
  • POSIX libc + initgroups(3) (musl libc, glibc, *BSD libc, ...)

Installation

# pass CC=cc macro if c99 is not available
make

# by default, only users in the wheel group can elevate privileges.
# to change the group, pass BINGRP=grp macro, where 'grp' is a desirable group.
#
# you must have appropriate privileges to run this command.
make PREFIX=/usr install

Usage

Instead of using a config file, ssu offloads authentication mechanism to the kernel by using unix permissions, which makes it simple and secure. However simplicity comes with a cost and such mechanism is not flexible at all; it is completely limited to the unix permissions. Therefore, ssu is only good for those who don't need complicated setups.

Here is an example how to setup ssu for a specific group(you must be root to run these commands):

# run 'id -gn' to see your current group.
# change 'me' to that group.
chown root:me /path/to/ssu

# allow your group to execute suid ssu and thus elevate privileges.
#
# extra(4) - setuid
# owner(7) - read, write, exec
# group(5) - read, exec
# other(4) - read
chmod 4754 /path/to/ssu

Note

While using ssu, you may encounter weird errors like 'invalid option'. In order to fix them, set POSIXLY_CORRECT environment variable or guard command-line arguments with '--'.

Example with ls:

POSIXLY_CORRECT=1 ssu ls -la /root
ssu -- ls -la /root

See also: https://wiki.musl-libc.org/functional-differences-from-glibc.html

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].