Skip to content

Instantly share code, notes, and snippets.

@xenophonf
Created August 30, 2018 14:24
Show Gist options
  • Save xenophonf/a122d361ca46e6087c956e4988697316 to your computer and use it in GitHub Desktop.
Save xenophonf/a122d361ca46e6087c956e4988697316 to your computer and use it in GitHub Desktop.
Add a TRAMP method named `sudosu` that runs `sudo su - <USERNAME>`
(add-to-list 'tramp-methods
'("sudosu"
(tramp-login-program "sudo")
(tramp-login-args
(("su")
("-")
("%u")))
(tramp-remote-shell "/bin/sh")
(tramp-remote-shell-login
("-l"))
(tramp-remote-shell-args
("-c"))
(tramp-connection-timeout 10)))
@xenophonf
Copy link
Author

BTW, sudo su makes Baby Jesus cry, so can you not?!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment