Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Canīt edit visudo file

  1. #1
    Join Date
    Feb 2008
    Location
    Funky Town, AUS
    Beans
    Hidden!
    Distro
    Xubuntu

    Question Canīt edit visudo file

    After having a few problems installing Ubuntu Studio Hardy, I got there. Trouble is, no privileges. I tried to work this out on another thread and have been getting somewhere. Problem now is this. This is what I have tried and posted from my last thread which can be found here:

    HTML Code:
    http://ubuntuforums.org/showthread.php?t=890786
    I have been booting into the recovery kernel, going to a terminal shell and plugging in;

    Code:
    visudo
    It shows me the file but wonīt let me edit it. I am wanting to try adding;

    Code:
    ustudio ALL=(ALL) ALL
    under the line that says;

    Code:
    root ALL=(ALL) ALL
    ... an idea from this page ...

    HTML Code:
    http://www.pendrivelinux.com/2007/10/05/how-to-add-a-user-to-the-sudoers-list/
    ustudio is my username, naturally. Seems obvious I need to put myself on the sudoers list, but no matter what I try, canīt seem to edit that file to do that. Getting very close and have come far with this but not quite there yet .... any ideas?

  2. #2
    Join Date
    Jun 2008
    Beans
    184

    Re: Canīt edit visudo file

    You do know how to use vi right?
    Ben

  3. #3
    Join Date
    Mar 2008
    Location
    City of Pines
    Beans
    3,585

    Re: Canīt edit visudo file

    On your terminal:

    Code:
    sudo visudo
    Steady movement is more important than speed, much of the time. So long as there is a regular progression of Stimuli to get your mental hooks into, there is room for lateral movement. Once this begins, its rate is a matter of discretion.

  4. #4
    Join Date
    Feb 2008
    Location
    Funky Town, AUS
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Canīt edit visudo file

    That is the point I am trying to make, iaculallad. This is the result ...

    Code:
    $ sudo visudo
    [sudo] password for ustudio: 
    ustudio is not in the sudoers file.  This incident will be reported.
    $
    Boot into recovery and run īvisudoī as root and canīt edit that file to put myself in sudoers list. Is there some other way of doing this? I am presuming I am on the right track. There seems to be no other problem apart from the fact I canīt access any drives. A rather big problem ...

    Quote Originally Posted by wibbe01
    You do know how to use vi right?
    Is there something I am missing here, wibbe01? Any tips gratefully accepted.
    Last edited by Bucky Ball; August 16th, 2008 at 04:31 AM.

  5. #5
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,943
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Canīt edit visudo file

    You are pressing 'i' to get into insert mode right?

  6. #6
    Join Date
    Aug 2007
    Beans
    96

    Re: Canīt edit visudo file

    nano /etc/sudoers

  7. #7
    Join Date
    Feb 2008
    Location
    Funky Town, AUS
    Beans
    Hidden!
    Distro
    Xubuntu

    Re: Canīt edit visudo file

    Quote Originally Posted by jerome1232 View Post
    You are pressing 'i' to get into insert mode right?
    In recovery boot you mean?

  8. #8
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,943
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Canīt edit visudo file

    yes when you boot into recovery mode, then type visudo, that launches vi, inwhich you have to hit 'i' to actually start editing.

  9. #9
    Join Date
    Jun 2008
    Beans
    184

    Re: Canīt edit visudo file

    Sorry I didn't say more earlier, I wanted to try and figure out where you were getting stuck before I tried to help much more than that.

    I'm not sure how the recovery mode works as I've never used it. When you tried visudo without the sudo were you able to get to the editing window? What I was asking innitially about understanding vi, and what that post above this one is saying is once you type "visudo" you are given the sudoers file in vi. In order to enter things in vi you have to hit the i key (there are others, but i is all you need to know). Once you press i you should be able to type what you want where you want it. After you have finished typing you can hit the escape key, followed by a ":wq" (without the quotes. After you type the colon you should see a colon in the bottom left of the window. After typing the ":wq" you hopefully are sent out and the file is saved. If it tells you it couldn't save the file, also at the bottom of the screen (usually in red) then you don't currently have permission to edit the file. I can't imagine the sudo is necessary when in the recovery, but I'm not really sure how that works. Tell me if you can get any editing working, and I'll be back in a bit.


    Edit: And fyi the wq stands for "write quit"
    Ben

  10. #10
    Join Date
    Dec 2007
    Location
    California
    Beans
    4,943
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: Canīt edit visudo file

    Quote Originally Posted by kevstar31 View Post
    nano /etc/sudoers
    nano doesn't work for the sudoers file, you have to use visudo.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

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