[SOLVED] Debian error msg: bash: visudo: command not found

Help with issues regarding installation of Debian
Post Reply
Message
Author
fracmo2000
Posts: 13
Joined: 2015-05-24 17:01

[SOLVED] Debian error msg: bash: visudo: command not found

#1 Post by fracmo2000 »

Hi i have just installed Debian 8 with Gnome desktop and trying to add my username to sudoers list.

When I open terminal and enter visudo I get the following error message...

Code: Select all

fracmo2000@debian:~$ su
Password: 
root@debian:/home/fracmo2000# visudo
bash: visudo: command not found
root@debian:/home/fracmo2000# 
Although I am quite new to debian, I have done this successfully in the past so not sure why this is happening? any ideas?
Last edited by fracmo2000 on 2015-05-24 18:19, edited 1 time in total.

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian 8 install. error msg: bash: visudo: command not f

#2 Post by Head_on_a_Stick »

Code: Select all

empty@BunsenLabs ~ % dpkg -S visudo
sudo: /usr/sbin/visudo
sudo: /usr/share/man/man8/visudo.8.gz
Therefore:

Code: Select all

su -c 'apt-get install sudo'
su -c 'gpasswd -a fracmo2000 sudo'
https://wiki.debian.org/sudo
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

fracmo2000
Posts: 13
Joined: 2015-05-24 17:01

Re: Debian 8 install. error msg: bash: visudo: command not f

#3 Post by fracmo2000 »

Head_on_a_Stick wrote:

Code: Select all

empty@BunsenLabs ~ % dpkg -S visudo
sudo: /usr/sbin/visudo
sudo: /usr/share/man/man8/visudo.8.gz
Therefore:

Code: Select all

su -c 'apt-get install sudo'
su -c 'gpasswd -a fracmo2000 sudo'
https://wiki.debian.org/sudo
thanks for quick reply, so do I just run the following two commands...

Code: Select all

su -c 'apt-get install sudo'
su -c 'gpasswd -a fracmo2000 sudo'
do I need to do anything with

sudo: /usr/sbin/visudo
sudo: /usr/share/man/man8/visudo.8.gz

do I still need to add myself to the sudoers list?
thanks

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: Debian 8 install. error msg: bash: visudo: command not f

#4 Post by Head_on_a_Stick »

fracmo2000 wrote:so do I just run the following two commands...

Code: Select all

su -c 'apt-get install sudo'
su -c 'gpasswd -a fracmo2000 sudo'
do I need to do anything with

sudo: /usr/sbin/visudo
sudo: /usr/share/man/man8/visudo.8.gz

do I still need to add myself to the sudoers list?
Adding your user to the "sudo" group (the second command I gave) is exactly equivalent to extending your user's permissions with visudo, it's just a little bit quicker that's all ;)

The output of `dpkg -S visudo` just shows which package the `visudo` command is from -- see man 1 dpkg
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

fracmo2000
Posts: 13
Joined: 2015-05-24 17:01

Re: Debian 8 install. error msg: bash: visudo: command not f

#5 Post by fracmo2000 »

Thanks for the explanation. I will read up on the links you gave me.

EDIT
I just looked in the sudoers list and my name wasn't there, the second command added me to the "sudo" group therefore no need to add me to sudoers list? is that correct?

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [SOLVED] Debian error msg: bash: visudo: command not fou

#6 Post by Head_on_a_Stick »

^ Yup.

If you look in /etc/sudoers, you will find these lines:

Code: Select all

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

fracmo2000
Posts: 13
Joined: 2015-05-24 17:01

Re: [SOLVED] Debian error msg: bash: visudo: command not fou

#7 Post by fracmo2000 »

Head_on_a_Stick wrote:^ Yup.

If you look in /etc/sudoers, you will find these lines:

Code: Select all

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL
fantastic, many thanks for your patience

User avatar
Head_on_a_Stick
Posts: 13446
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: [SOLVED] Debian error msg: bash: visudo: command not fou

#8 Post by Head_on_a_Stick »

You're welcome :)
Black Lives Matter

Debian buster-backports ISO image: for new hardware support

Post Reply