-2

I tried to set an environment variable for the Sublist3r tool and messed up. Now whenever I switch to the root user (with sudo su) the only command I am able to use is exit (attaching the images).

I tried to edit /root/.bashrc but it seems to be fine on non-root user account. I also checked the PATH on root account which it is showing as 'sublister-1'. How can I edit /root/.bashrc?

2 Answers 2

1

As the normal user:

sudo /bin/nano /root/.bashrc 

And please don't sudo su, you can use sudo -i and sudo -s to get elevated shells (see the Q/A Is there ever a good reason to run sudo su?).

1
  • Thanks a lot sir. Issue resolved. Commented Aug 17, 2020 at 12:26
1

sudo su is perfectly okay depending on use cases, as of "missing" commands, utilities is still there, you just need to use full paths to access them.

/usr/bin/nano /usr/bin/vim 

and so on, fix your $PATH and it should be back to normal

1
  • Thanks, it helped a lot :) Commented Aug 17, 2020 at 12:27

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.