-
Senior Member
registered user
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.
-
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.
-
Senior Member
registered user

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.
-
Senior Member
registered user
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.
-
Senior Member
registered user

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.
-
Senior Member
registered user

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.
-
Senior Member
registered user

Originally Posted by
baldyeti

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.
-

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!
-
Senior Member
registered user
Used mcedit to make changes. Thank You.
-
Senior Member
registered user

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
)
Similar Threads
-
By waellinux in forum General Support
Replies: 2
Last Post: 04-30-2005, 05:36 PM
-
By clarjon1 in forum Tips and Tricks
Replies: 2
Last Post: 03-11-2005, 10:05 PM
-
By vdesibabu in forum Customising & Remastering
Replies: 0
Last Post: 01-05-2005, 05:47 PM
-
By nishtya in forum General Support
Replies: 5
Last Post: 11-20-2004, 09:48 PM
-
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
-
Forum Rules

Seagate 8TB Internal
$120.00

Western Digital HUS726T4TAL5204 4TB 7.2K SAS 12Gb/s 3.5" 512e HDD NetApp X375A
$64.00

HGST Ultrastar HUS726040AL5210 4TB 7200RPM SAS 12Gb/s Enterprise HDD
$41.00

WD Re 3TB Enterprise 3.5" HDD SATA 6Gb/s 7200RPM 64MB Cache
$70.00

Dell ST6000NM0034 1HT27Z-150 NWCCG 6TB SAS 3.5 7.2K ENTERPRISE SERVER DRIVE
$68.99

Seagate ST3000NM0005 HDD 3TB SATA 6Gb/s 7.2K 3.5" 512 b/s
$59.00

Hitachi Ultrastar 3TB 7200RPM 3.5in SATA III 6Gb/s - enterprise-grade hard drive
$49.00

HGST HUS724040ALA640 4TB 7200 RPM SATA 3.5" Internal Desktop Drive 100% Health
$78.00

Seagate ST8000NM0075 Enterprise Capacity 3.5 HDD 8TB SAS Hard Drive 8TB EXOS
$184.99

DELL 2TB Enterprise HDD (7200RPM, 3.5", SATA III, 128MB Cache) HUS722T2TALA600
$49.95