So recently, some of my friends had been tampering with my files and data through terminal, so I decided to secure it by doing two things:
First, I added the following to my ~/.bash_profile for ALL commands:
alias <command>="sudo <command>", to require a password to use any command.
Second, I ran the command
sudo visudo to edit the sudo settings and added
Defaults:user_name timestamp_timeout=0 to the end of the file to make sudo be required instantly after every new command (for those who don't know, with default settings, if you enter your password once to unlock sudo, sudo doesn't require a password for the couple of minutes).
Anyways, I did all of this to secure my file-system, but now newly-opened tabs in terminal require a password to get in, and once I enter the correct password, the tab doesn't unlock; I just get another password requirement. No matter how many times I enter my correct password, it keeps on asking again (with default timeout 0).
Last login: Sat Jan 10 14:52:20 on ttys002 Password: Password: Password: Password: Password:
Essentially, I am locked out of my own terminal, unable to do anything.
Also, I cannot edit the /etc/sudoers/ file because I do not have permission; I cannot even view my ~/.bash_profile because it is a hidden file.
Is there any way to undo either of these two commands or to somehow access or unlock my terminal?