You are not logged in.

#1 2012-07-23 09:56:21

Lilith
Member
From: Sardinia, Italy
Registered: 2012-04-16
Posts: 117

Can't edit the file of sudoers

Hi guys,

i'm following the arch wiki's page for skype, and i must edit the sudoers file for give permissions to user skype but when i do:
sudo visudo

The editing of file start, but when i touch a key, nothing change. Obviously i can't save or exit.. when i do ctrl c, the damn fall in EOF loop that force me to close the terminal directly.

Any idead?
Thanks, Gabriele.


#551378
Sky is the limit.

Offline

#2 2012-07-23 10:01:05

fatboy
Member
From: India
Registered: 2012-03-17
Posts: 73

Re: Can't edit the file of sudoers

Try this

$ sudo -i
# EDITOR=nano visudo

I think it is opening vi by default.

EDIT: Also in a single command (Correction)

$ sudo EDITOR=nano visudo

Last edited by fatboy (2012-07-23 17:40:53)

Offline

#3 2012-07-23 11:34:52

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,571
Website

Re: Can't edit the file of sudoers

no need for "env".

sudo EDITOR=nano visudo

"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#4 2012-07-23 12:59:20

Lilith
Member
From: Sardinia, Italy
Registered: 2012-04-16
Posts: 117

Re: Can't edit the file of sudoers

Oh, i'm so noob u.u

Many thanks guys:)


#551378
Sky is the limit.

Offline

#5 2012-07-23 13:57:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: Can't edit the file of sudoers

Please remember to mark the thread as solved.

Offline

#6 2012-07-23 14:46:30

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Can't edit the file of sudoers

Yeah, by default it opens in a text editor called vi. If you want to use it with nano, you can add "Defaults editor=/usr/bin/nano" to the very fist line and re-login. Then you can just run:

$ sudo visudo

Instead of:

$ sudo EDITOR=nano visudo

For example:

Defaults editor=/usr/bin/nano

root    ALL=(ALL) ALL
dspider ALL=(ALL) ALL

dspider ALL=NOPASSWD: /bin/mount, /bin/umount
dspider arch=NOPASSWD: /sbin/reboot, /sbin/poweroff

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

Board footer

Powered by FluxBB