Skip to content

Instantly share code, notes, and snippets.

@plembo
Created March 24, 2019 06:38
Show Gist options
  • Save plembo/181f170d008224e0fce84b0a9f7e2a74 to your computer and use it in GitHub Desktop.
Save plembo/181f170d008224e0fce84b0a9f7e2a74 to your computer and use it in GitHub Desktop.
Ubuntu files setuid root

What files on Ubuntu are setuid root?

Specifically, what files on Ubuntu 18.04 LTS under /usr/bin are setuid root?

(from my reference instance)

me@mine:/usr/bin$ ls -l | grep "^-rws"
-rwsr-xr-x 1 root root    22528 Mar  9  2017 arping
-rwsr-xr-x 1 root root    76496 Jan 25  2018 chfn
-rwsr-xr-x 1 root root    44528 Jan 25  2018 chsh
-rwsr-xr-x 1 root root    75824 Jan 25  2018 gpasswd
-rwsr-xr-x 1 root root    40344 Jan 25  2018 newgrp
-rwsr-xr-x 1 root root    59640 Jan 25  2018 passwd
-rwsr-xr-x 1 root root    22520 Jan 15 08:18 pkexec
-rwsr-xr-x 1 root root   149080 Jan 17  2018 sudo
-rwsr-xr-x 1 root root    18448 Mar  9  2017 traceroute6.iputils

To setuid a file (like sudo), first check to make sure it is set "-rwxr-xr-x", then use this command against each file that needs to be set:

$ sudo chmod u+s file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment