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
  •  


Intel Xeon w9-3475X SRM30 CPU 2.2Ghz 36-Core LGA4677 Sapphire Rapids *USA* picture

Intel Xeon w9-3475X SRM30 CPU 2.2Ghz 36-Core LGA4677 Sapphire Rapids *USA*

$2599.00



Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS picture

Dell Precision Tower 7810 Xeon E5-2630 v3 @ 2.40GHz , 32GB Ram, NO HDD, NO OS

$239.99



Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram  2x 550W PSU No HDD picture

Dell EMC PowerEdge R440 Xeon silver 4215 2.5GHz 16 GB ram 2x 550W PSU No HDD

$275.00



Lenovo ThinkStation P520c Intel Xeon W-2133 6-Core 3.60GHz -NO RAM/ HDD/ GPU/ OS picture

Lenovo ThinkStation P520c Intel Xeon W-2133 6-Core 3.60GHz -NO RAM/ HDD/ GPU/ OS

$127.54



Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS picture

Dell Precision T5820 Workstation 3.70GHz W-2135 No RAM/ GPU/ HDD/ OS

$179.98



Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS picture

Intel Xeon E5-2699 V4 2.20GHz 55M 22-CORES LGA2011-3 Server Processor 145W SR2JS

$84.49



Intel Xeon Platinum 8268 2.9GHz 24-Core FCLGA3647 Processor | SRF95 picture

Intel Xeon Platinum 8268 2.9GHz 24-Core FCLGA3647 Processor | SRF95

$119.99



Intel Xeon E5-2690 v4 SR2N2 14 Core 2.6GHz 35MB LGA2011-3 CPU *km picture

Intel Xeon E5-2690 v4 SR2N2 14 Core 2.6GHz 35MB LGA2011-3 CPU *km

$15.99



Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor   picture

Intel Xeon Phi 5110P 60-Core 1.053GHz Coprocessor

$50.00



For Parts - Lenovo ThinkServer TS460 Part Number: 70TT-0020UX picture

For Parts - Lenovo ThinkServer TS460 Part Number: 70TT-0020UX

$149.99