You are not logged in.

#1 2009-09-28 19:50:39

Alfihar
Member
From: UK
Registered: 2009-09-02
Posts: 2

visudo

I've just performed a fresh install, the only things I have done so far after rebooting is to run "pacman -Sy", create a new user and install sudo.

To setup sudo I ran "visudo", I'm pretty sure this used to work ok in the past. However now I can see the sudo file but insert does not allow me to edit anything, and the screen flickers a lot as I try to move around.

I see there are some changes regarding vi and vim on the main page, though I'm not sure how this applies to a fresh install.

Now I know I can run "EDITOR=nano visudo" and edit the file using nano instead, which is what I did.

I'd like to know whether I've done something silly and how I can fix visudo.

Offline

#2 2009-09-28 20:00:39

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: visudo

I can confirm that this happens.  I just tried to edit sudoers with the visudo command and the behaviour was exactly as you describe.  "EDITOR=vim visudo" worked fine.  I have no idea how to fix it.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#3 2009-09-28 20:02:44

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: visudo

Do you know how to use vi/vim? If not, that's what you need to learn if you want to use visudo without substituting nano for vi.
The behavior you are describing sounds like you are simply unfamiliar with vi.

Offline

#4 2009-09-28 20:19:34

loafer
Member
From: the pub
Registered: 2009-04-14
Posts: 1,772

Re: visudo

Doh!  Of course I had always used vim to edit visudo before the recent upgrade.


All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.

Offline

#5 2009-09-28 20:35:25

Misfit138
Misfit Emeritus
From: USA
Registered: 2006-11-27
Posts: 4,189

Re: visudo

loafer wrote:

Doh!  Of course I had always used vim to edit visudo before the recent upgrade.

Does it help to rm /usr/bin/{view,rview} as detailed on the main page?

Offline

#6 2009-09-28 21:01:55

jordz
Member
Registered: 2006-02-01
Posts: 248

Re: visudo

I think you need to install vim, because the vi package is now compiled with less options.

Offline

#7 2009-09-28 21:26:39

Alfihar
Member
From: UK
Registered: 2009-09-02
Posts: 2

Re: visudo

Ah this all makes a lot more sense now.

Misfit138 wrote:

The behavior you are describing sounds like you are simply unfamiliar with vi.

Yeah I'm not familiar with vi, and I only really know the basics of vim and not properly at that as I'm used to using the arrow keys.

Anyway I've installed vim, and "EDITOR=vim visudo", now works as it used to.
Not that I really need to edit the sudoers file that often, and since I just use vim mostly for editing the various config files, now that I've installed it I'm happy.

Thanks everyone.

Offline

Board footer

Powered by FluxBB