Page 2 of 2 FirstFirst 12
Results 11 to 20 of 20

Thread: Sudo list.

  1. #11
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    First open a console, and become root by typing "su -", then the root password. Then "mcedit /etc/sudoers" should do.

    Oh, and removing vi from a unix-like system for the sake of reclaiming a few tens of kilobytes is just plain silly.

    edit: Actually visudo seems to be compiled with alternative editor support enabled on debian, so "EDITOR=mcedit visudo" works, and locks/validates the sudoers file like it should. Neat.

  2. #12
    Senior Member
    Join Date
    Oct 2003
    Location
    GA
    Posts
    382
    C'mon, VI isn't so bad for things like this. I won't claim to be an expert on it, but I can view or fix my files with it and quit with or without saving...which is all you really need for simple editing like this. And you can learn to do those things in 10 seconds. I'd never choose it over a graphical text editor (of which I usually use KEdit...because it's simple and loads instantly), but when I'm outside of X I use VI.

  3. #13
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    900
    Quote Originally Posted by rrfish72
    So how do I add to the llist? I don't know how to edit the list because I can't find it. Help?
    You have to be root to edit the file:

    su
    <passwd>

    Then use any editor you like:

    xedit /etc/sudoers

    You'll need an entry like this:

    username ALL=(ALL) ALL

    OR for passwordless sudo (kind of a security risk)

    username ALL = NOPASSWD: ALL

    Just add one or the other entry. You do not need both.

  4. #14
    Senior Member registered user
    Join Date
    Feb 2004
    Posts
    235
    Baldi,

    Where were you when this thread started? If I had known about editing visudo to use mcedit or nano, I wouldn't have a reason to rant about vi (or vim, as Stephen pointed out). Is there any chance this thread can be made into a sticky for newbies?

    Btw, I didn't remove vi for space reasons, I removed it because I hated it and won't use it at all.

  5. #15
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by rrfish72
    So how do I add to the llist? I don't know how to edit the list because I can't find it. Help?
    Well the Knoppix file looks different than this IIRC.

    Code:
    # sudoers file.
    #
    # This file MUST be edited with the 'visudo' command as root.
    #
    # See the man page for details on how to write a sudoers file.
    #
    
    # Host alias specification
    
    # User alias specification
    
    # Cmnd alias specification
    
    # User privilege specification
    root    ALL=(ALL) ALL
    stephen ALL=(ALL) ALL
    To edit the file you use the already mentioned visudo. Now when the file opens you use the down arrow to get to the "User privilege specification" section then you hit the INSERT key type in a line similar to mine except using your user name at the start then when done use the SHIFT and ; keys at the same time which results in a : appearing in the lower left of the console/console widow now you would type in wq then enter key to write and quit the file now you are done.

  6. #16
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    555
    Quote Originally Posted by Durand Hicks
    If I had known about editing visudo to use mcedit or nano, I wouldn't have a reason to rant about vi
    Setting the environment variable EDITOR in your .profile is an old unix convention. A few command line programs will use what it points to (instead of the default vi) when they need to call an external editor. I know visudo, vipw, "crontab -e", mailx ... will follow that convention.

  7. #17
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Nova Scotia, Canada
    Posts
    2,479
    Quote Originally Posted by baldyeti
    Quote Originally Posted by Durand Hicks
    If I had known about editing visudo to use mcedit or nano, I wouldn't have a reason to rant about vi
    Setting the environment variable EDITOR in your .profile is an old unix convention. A few command line programs will use what it points to (instead of the default vi) when they need to call an external editor. I know visudo, vipw, "crontab -e", mailx ... will follow that convention.
    If you want to change the default in Debian you can use update-alternatives --config editor.

  8. #18
    Member registered user
    Join Date
    Jun 2004
    Posts
    83
    Quote Originally Posted by Durand Hicks
    How anyone ended up liking vi as an editor is beyond me, that is the most unfriendly, unintiutive editor I have ever laid eyes on.
    Vi is completely inappropriate for a newbie editing a one-off file once every 3 months. We all agree with that and that is why Linux offers so many simpler alternatives. However, for a professional programmer who lives in an editor most of the day, vi (nowadays vim) is a killer app. I create entire beautiful worlds in vim quicker than you can type in your editors name! Vim is the ultimate conduit between my brain and the computer. Don't knock my vi!

  9. #19
    Senior Member registered user
    Join Date
    Jul 2004
    Location
    Wisconsin, USA
    Posts
    536
    Used mcedit to make changes. Thank You.

  10. #20
    Senior Member registered user
    Join Date
    Mar 2004
    Posts
    900
    Quote Originally Posted by rrfish72
    Used mcedit to make changes. Thank You.
    A fine choice of editors! You'll find that mc (midnight commander) is capable of so many things including easy file transfer through ftp & ssh. You can also play mp3's & .ogg's, execute files, create and delete directories etc. Anything you can do with a graphical file manager can be done w/ mc (well ok not d&d )

Page 2 of 2 FirstFirst 12

Similar Threads

  1. problem with sudo
    By waellinux in forum General Support
    Replies: 2
    Last Post: 04-30-2005, 05:36 PM
  2. Sudo under HD install
    By clarjon1 in forum Tips and Tricks
    Replies: 2
    Last Post: 03-11-2005, 10:05 PM
  3. knoppix sources.list repository incomplete list.
    By vdesibabu in forum Customising & Remastering
    Replies: 0
    Last Post: 01-05-2005, 05:47 PM
  4. screwed up sudo
    By nishtya in forum General Support
    Replies: 5
    Last Post: 11-20-2004, 09:48 PM
  5. what's the difference with sudo ???
    By ptesone in forum Hdd Install / Debian / Apt
    Replies: 2
    Last Post: 03-18-2004, 07:01 PM

Posting Permissions

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


5 Port Gigabit Unmanaged Ethernet Switch, Home Network Hub, Office Ethernet S... picture

5 Port Gigabit Unmanaged Ethernet Switch, Home Network Hub, Office Ethernet S...

$9.64



NETGEAR GS308EP Essential Series 8-Port Gigabit PoE+ Unmanaged Switch picture

NETGEAR GS308EP Essential Series 8-Port Gigabit PoE+ Unmanaged Switch

$49.99



Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch picture

Cisco WS-C3650-12X48UR-L 48-Port Stackable Layer 3 8x10G SFP+ Port Switch

$129.99



TP-Link TL-SG1048 48-Port Gigabit Rackmount Switch New Factory Sealed picture

TP-Link TL-SG1048 48-Port Gigabit Rackmount Switch New Factory Sealed

$199.99



TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch picture

TP-Link TL-SG105 5-Port Gigabit Ethernet Unmanaged Metal Desktop Network Switch

$19.99



TP-Link TL-SG105, 5 Port Gigabit Unmanaged Ethernet Switch, Network Hub, Ethern picture

TP-Link TL-SG105, 5 Port Gigabit Unmanaged Ethernet Switch, Network Hub, Ethern

$15.25



10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W picture

10-Port Gigabit PoE Network Switch with 8 PoE+ Ports with 2 Combo SFP Slots 125W

$39.99



NETGEAR 5-Port Gigabit Ethernet Unmanaged Switch (Gs305) - Desktop Quiet Fanless picture

NETGEAR 5-Port Gigabit Ethernet Unmanaged Switch (Gs305) - Desktop Quiet Fanless

$16.41



5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play picture

5Ports Gigabit Network Switch w/ 4 PoE+ Ports Total 52W each port 30W Plug&Play

$31.99



Brocade ICX6450-24 24-Port Gigabit Ethernet Network Switch W/ Ears picture

Brocade ICX6450-24 24-Port Gigabit Ethernet Network Switch W/ Ears

$74.99