Skip to content
/ fake-sudo Public

A drop-in sudo replacement that uses user namespaces to pretend we are root.

Notifications You must be signed in to change notification settings

0ex/fake-sudo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fake-sudo

fake-sudo uses user namespaces and seccomp system call filtering to pretend to be root.

It can be used on place of fakeroot in some places.

Install

Requirements:

  • libseccomp >= 2.5.0

Debian

apt-get install -yq python3-seccomp util-linux
curl -o /usr/bin/sudo https://github.com/0ex/fake-sudo/raw/master/fake-sudo.py
chmod +x /usr/bin/sudo

Arch

pacman -S python-libseccomp
curl -o /usr/bin/sudo https://github.com/0ex/fake-sudo/raw/master/fake-sudo.py
chmod +x /usr/bin/sudo

To avoid sudo being overwritten (out of date):

curl -L -o /root/fake-sudo.pkg https://github.com/0ex/fake-sudo/releases/download/v1/fake-sudo-1-1-x86_64.pkg.tar.xz
pacman -U --noconfirm /root/fake-sudo.pkg

see also

dev notes

Flags

  • SECCOMP_USER_NOTIF_FLAG_CONTINUE=1 - let call continue (not totally secure)

About

A drop-in sudo replacement that uses user namespaces to pretend we are root.

Resources

Stars

Watchers

Forks

Packages

No packages published