1

I am fairly new at Ubuntu system and commands. I was trying to follow some tutorial online explaining how to setup using no password to download apps. I was in visudo, and next thing I know I can't use the sudo command, nor download any software/apps.

I don't know where to start looking. If anyone could point me in the right direction, that would be an awesome way to start my weekend.

2
  • Have you got a link to the online tutorial? What point did you get to in it?
    – Rory Alsop
    Nov 30 '18 at 14:47
  • Here is website i "tried" to follow the tutorial from - quora.com/…. As for what point , followed all of the steps that it had me follow. It let me run one command after i implemented the tutorial. And then , anything after that it kicks back errors if i try and run sudo. Nov 30 '18 at 17:33
0

visudo edits the sudoers file, which defines the users and groups with administrator rights. So It looks like you have changed `/etc/sudoers'. Now you can't edit it so only way to edit it is by running Ubuntu directly from either a USB stick or a DVD and edit it back to its original.

for that:

Boot from Ubuntu installation DVD or USB drive and choose 'Try Ubuntu without installing'. Mount the partition of your Ubuntu Installation. If you are not sure which one, launch GParted (included in the Ubuntu installation DVD or USB) or. Open a terminal (Ctrl+Alt+T) and use the following command:

sudo fdisk -l

and find out. It is usually a EXT4 Partition. Replace the XX with the drive letter, and partition number, for example: sudo mount /dev/sda1 /mnt.

sudo mount /dev/sdXX /mnt

XX being the partition where Ubuntu is installed.

then

sudo gedit /mnt/etc/sudoers

and edit the file as per the text here

If you want to disable password for sudo add this line

username    ALL=(ALL:ALL) NOPASSWD: ALL

below the line

%sudo   ALL=(ALL:ALL) ALL

save and

sudo umount /mnt

and

sudo reboot

Boot into your Ubuntu. Done.

3
  • Ok , forgive my lack of experience. But when you say run it live , is that meaning I download Unbuntu and put that on to a USB stick ? I used Rufus before and it seemed to work. Nov 30 '18 at 19:18
  • Yes that's okay. Plug in. Sart PC. From Boot menu. Boot from USB drive. Select try Ubuntu.
    – Vijay
    Nov 30 '18 at 20:20
  • 1
    Ok , everything worked. Thank you so much for the advice. I have been going crazy over this. I have everything up and running! Dec 1 '18 at 3:13

Not the answer you're looking for? Browse other questions tagged or ask your own question.