[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2009-01-27 Thread Martin Pitt
In Ubuntu 8.10, sensible-editor defaults to nano now, and select-editor
(which will run by default the first time) allows you to select another
one.

** Changed in: sudo (Ubuntu)
   Status: Confirmed = Fix Released

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-04-26 Thread Iain Bucław
You could add these lines:

CODE:
# Set Environment for sudo -E.
#export EDITOR=vim
#export EDITOR=nano

# Make sudo -E the default setting for sudo.
# alias sudo='sudo -E'
:CODE

to the ~/.bashrc file, so that slightly advanced users can set this up right.
Or when given directions to this, all they have to do is uncomment the right 
lines.

At least, this is what I've ended up doing with my system

Regards
Iain

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-04-25 Thread Paulo
I am using the final version of Hardy and, like Iain, also have the
habit to remove the password grace period. I also limit sudo password
grace period to individual ttys, instead of global, by adding
Defaults:ALL tty_tickets.

I was driving nuts and almost ruined sudoers because I couldn't edit
anything when sudo visudo (:i, Esc, :w, etc... nothing worked).
Luckily I found this thread and the tip by Constantine Evans solved this
issue.

Sorry to say, but this is totally crazy! I love Ubuntu (especially Hardy
where everything works great) but this bug is a real pain in the neck.

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-27 Thread Martin Pitt
Although I'm a die-hard vi user myself, I do appreciate that it is
absolutely the wrong default if someone innocent accidentally runs into
it. :-)

Therefore I am reopening this bug for usability reasons. I think the
least that we can do is to add a comment to the top of the file to
document how to use a different editor.

** Changed in: sudo (Ubuntu)
   Importance: Undecided = Low
 Assignee: (unassigned) = Martin Pitt (pitti)
   Status: Invalid = Confirmed

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-27 Thread Constantine Evans
It's certainly an unfortunate default, and I had hoped it would be
brought up elsewhere, as, at least at one time, I seem to recall that
these sorts of issues weren't handled in bugs, especially for issues
involving confusing behaviour and vi.

One option would be to undo the changes made for the Debian bug, making
visudo use editor rather than vi once again, and then change the
documentation, which seems mainly to consist of the man page. For
consistency, however, it appears we would need to change vigr and vipw
as well.

Another would be to create a command edit_sudoers (and presumably
edit_passwd and edit_group as well), which would use editor/$EDITOR
instead (the latter is made more difficult, of course, by the env_reset
default of sudo); this would allow Ubuntu to have commands for editing
these files that would be usable by most cli users, while at the same
time not making the behaviour of the vi{sudo,pw,gr} commands unexpected
for those experienced with other systems.

I don't quite understand why visudo is so restrictive about the editor
anyway.

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-27 Thread Iain Bucław
Okay, I agree with both you.

Martin, yes, a fix for this is something that should be discussed.

I totally agree with adding three new apps that have the ability to
change the files in accordance.

In the one end you have visudo, vigr  vipw that use vi. and the other
you can have pisudo, pigr  pipw that use pico/nano. (I checked the
names for any clashes, and they seem to be original).

Also changing the /etc/sudoers file too would be another start too.

Currently it says:
# /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# See the man page for details on how to write a sudoers file.
#

Maybe having instructions on how to close vi. For when a future hardy user runs 
visudo without expecting it to open in vi (like what I did).
And including instructions on how to open and edit the file in another editor 
for users who either don't know how to work vi, or don't wish to work with vi.

And I agree with you too Constantine. I think that this bug should be
closed and re-opened as a wishlist bug named pico/nano editor for
/etc/sudoers, passwd  group files. Also /etc/shadow  gshadow,
respectively. (I have done some research since opening this bug and have
learnt a bit about how things work)

Regards
Iain

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-26 Thread tinivole

** Attachment added: Dependencies.txt
   http://launchpadlibrarian.net/12908460/Dependencies.txt

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-26 Thread Constantine Evans
(I'm assuming this isn't a prank about vi)

I'm afraid this is the direct result of bug #388659, which means that
visudo will now use vi by default. Vi is an editor with a rather
different model of editing.

If you want to use nano, set your $EDITOR variable (eg, export
EDITOR=nano), and then either use sudo -E to run visudo, or remove
env_reset from sudoers.

I'm closing this as invalid, because it seems that it is actually the
correct, documented behaviour of visudo (there is, after all, a reason
for it to have that name). Discussions about changing this probably need
to take place elsewhere.

** Changed in: sudo (Ubuntu)
   Status: New = Invalid

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-26 Thread Constantine Evans
Sorry, that bug number appears to be a Debian bug. See
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=388659 .

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 207369] Re: visudo is completely unusable (/etc/sudoers can only be editted with an external text editor)

2008-03-26 Thread tinivole
Ok, that has solved it.
Sorry, but I've never used vi before.

But seriously, is it *that* unusable?
How do you write in it?
Space doesn't work, letters don't print, all what I managed to figure out was 
that q sets recording to on, whatever that is...

I'm not being funny, I was rather shocked how a five second job in nano
Defaults:ALLtimestamp_timeout=0
Resulted in half an hour of getting absolutely nothing done but ruin the 
sudoers.tmp file and eventually lock myself out due to a forced close.

Sorry, as you may know all about how to use vi yourself, but it wasn't
very pleasant to my first experience of it (and yes, I do use emacs on
the odd occasion before you start thinking it)

Thank-you anyway.
Problem is solved now.

Regards
Iain

-- 
visudo is completely unusable (/etc/sudoers can only be editted with an 
external text editor)
https://bugs.launchpad.net/bugs/207369
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs