Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
my terminal says bash: visudo : command not found how do i edit sudoers file?...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    72

    visudo command


    my terminal says bash: visudo : command not found
    how do i edit sudoers file?

  2. #2
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    You first need to switch to root in order to run visudo.

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    2
    I also see the same message when trying "visudo". I am logged in as root already?

  4. #4
    Just Joined!
    Join Date
    Mar 2008
    Posts
    2
    Instead of doing just "su" to log in as root I neded to do "su -" so that I would inherit the root path.
    visudo was in /usr/sbin which is not in the typical path

    Hope this help.

  5. #5
    Just Joined!
    Join Date
    Mar 2008
    Posts
    72
    to edit sudoers file run
    nano /etc/sudoers as root..
    press ctrl+x and press y to save changes

  6. #6
    Linux User Allblack's Avatar
    Join Date
    May 2003
    Location
    Godzone
    Posts
    416
    Bad practice my friend, visudo exists for a purpose.
    Checks for parse errors and protects against simultaneous edits
    I am on a journey to mastering Linux and I got a bloody long way to go!!!

  7. #7
    Just Joined!
    Join Date
    Mar 2008
    Posts
    72
    but it gives an error saying visudo command not found...
    wat to do?

  8. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    What the output of this
    Code:
    su -
    visudo
    Make sure to type minus sign ( - ) after su. su -
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  9. #9
    Blackfooted Penguin daark.child's Avatar
    Join Date
    Apr 2006
    Location
    West Yorks
    Posts
    4,393
    Quote Originally Posted by vik_vig View Post
    but it gives an error saying visudo command not found...
    wat to do?
    Someone already informed you that you have to switch to root using "su -" in order to access the visudo command. I've seen other threads you started about not being able to run certain commands. Most distributions do not put the */sbin directories in a normal users path, so if you want to run commands in these directories, use the full path name or switch to root using "su -" and not just "su".

  10. #10
    Just Joined!
    Join Date
    Mar 2008
    Posts
    72
    where can i get a detalied list of all commands including the specail ones available in fedora..?
    i want the explanation for different option of each command?
    please provide me a link..

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •