-
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

KNOPPIX 9.1 Linux Install & Live DVD 32bit & 64bit
$19.99

Windows XP, Vista, 8.1, Linux Knoppix, Office XP, (6 CDS)
$12.00

Knoppix Live GNU Linux System 9.1 on Bootable CD / DVD / USB Flash Drive
$5.99

KNOPPIX USB DVD OS , BEST OF ALL HIGHLY RECOMENDED
$11.99

VINTAGE SOFTWARE | KNOPPIX STD 0.1 (SECURITY TOOLS DISTRIBUTION)
$7.57

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 16G USB Stick
$20.85

Knoppix NSM 1.2
$8.00

Knoppix Linux Bootable OS v8.6 "Original Live Operating System" 32G USB Stick
$21.42

Hamshack Live DVD-ROM
$7.00

Knoppix 5.0.1 ULTRA RARE Linux DVD - Linux Pro Extra August 2006
$34.01