Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

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

Ask for help with issues regarding the Installations of the Debian O/S.
Post Reply
Message
Author
fracmo2000
Posts: 16
Joined: 2015-05-24 17:01
Been thanked: 1 time

[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: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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
deadbang

fracmo2000
Posts: 16
Joined: 2015-05-24 17:01
Been thanked: 1 time

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: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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
deadbang

fracmo2000
Posts: 16
Joined: 2015-05-24 17:01
Been thanked: 1 time

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: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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
deadbang

fracmo2000
Posts: 16
Joined: 2015-05-24 17:01
Been thanked: 1 time

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: 14114
Joined: 2014-06-01 17:46
Location: London, England
Has thanked: 81 times
Been thanked: 133 times

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

#8 Post by Head_on_a_Stick »

You're welcome :)
deadbang

Post Reply