You are not logged in.
Topic says it all. I went to visudo this morning was was presented with:
# visudo
visudo: /etc/sudoers.tmp unchanged
Googling around didn't nail it down. Anyone else?
Last edited by graysky (2010-09-11 00:24:02)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
sudo visudo?
No, just ran visudo as root as I always do.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Try running:
visudo -c
to check your visudo syntax.
Also, see what editor is set in your sudoers file; that may be the problem. If no editor is set, it defaults to vi.
Last edited by Stebalien (2010-09-06 12:21:04)
Offline
Are there by any chance pacsave files related to visudo in your system?
Can you edit via 'sudo visudo' or not? Do you get it if you just view the file without making any changes (that makes sense)? Do you still get '/etc/sudoers.tmp unchanged' if you edit the file (e.g. add an empty line)?
I get 'visudo: /etc/sudoers.tmp unchanged' after I just view w/o making any changes, but I can run visudo both as root and as a user.
Last edited by karol (2010-09-06 12:28:53)
Offline
@stebalien -
1) How can I see which is my default editor? Where is this stored?
2)
# visudo -c
/etc/sudoers: parsed OK
@karol -
1) Yeah and I have tried using them as my /etc/sudoers with the same results.
2) I don't have my regular users setup to sudo visudo so, no.
3) I can cat it or nano /etc/sudoers just fine. For that matter, I can vim /etc/sudoers also.
4) I tried adding an empty line in vim and still get that error when I call it via visudo
WTF?
Last edited by graysky (2010-09-06 12:55:51)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
But is it really an error? I can use visudo and I get the same 'visudo: /etc/sudoers.tmp unchanged' if I don't make any changes, so that line doesn't really tell us much.
Your editor:
[karol@black ~]$ echo $EDITOR
/usr/bin/vim
You can also check 'echo $VISUAL'.
Last edited by karol (2010-09-06 13:09:04)
Offline
Hmm... in the past when I wanted to edit /etc/sudoers I would type 'visudo' and that would load 'vi /etc/sudoers' for me. Now it does nothing be give that error. Also, my $EDITOR and $VISUAL both appear blank....
I tried:
# export EDITOR=vi
# visudo
visudo: /etc/sudoers.tmp unchanged
Dunno what to think about this.
Last edited by graysky (2010-09-06 13:24:28)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Have you tried removing/renaming that file and trying again?
I don't have that file and things seem to work just fine. $EDITOR and $VISUAL are both blank here.
R00KIE
Tm90aGluZyB0byBzZWUgaGVyZSwgbW92ZSBhbG9uZy4K
Offline
Have you tried removing/renaming that file and trying again?
I don't have that file and things seem to work just fine. $EDITOR and $VISUAL are both blank here.
I set $EDITOR for my scripts, so it being blank is 100% fine.
That file is just a temp, it's created when you type 'visudo' and removed when you exit it.
Offline
I've tried making the tmp file but no change. I tried removing sudo and again, no change. I'm out of ideas.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
What if you run "EDITOR=vi visudo"?
Offline
EDIT: Sorry, I misread the bug report I linked to.
Last edited by cesura (2010-09-06 16:30:12)
Offline
What if you run "EDITOR=vi visudo"?
# EDITOR="vi visudo"
# visudo
visudo: /etc/sudoers.tmp unchanged
Last edited by graysky (2010-09-06 17:26:05)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Well I meant run "EDITOR=vi visudo" as one command.
Offline
Well I meant run "EDITOR=vi visudo" as one command.
Ah, sorry:
# EDITOR=vi visudo
visudo: /etc/sudoers.tmp unchanged
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
do you have vi and ex installed?
Offline
do you have vi and ex installed?
I have vi installed but I'm not sure what package ex is...
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
How about
EDITOR=/usr/bin/nano su -c /usr/sbin/visudo
Last edited by yejun (2010-09-06 19:15:38)
Offline
skunktrader wrote:do you have vi and ex installed?
I have vi installed but I'm not sure what package ex is...
vi/ex are the same package.
This is really odd.
"visudo: /etc/sudoers.tmp unchanged" suggests the editor has simply exited without making any changes, like when you use ":q".
Check any aliases in either your user or roots .bashrc for anything that could be causing this.
Last edited by loafer (2010-09-06 19:56:10)
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
@yejun - That does work, but still gives the funky message:
]# EDITOR=/usr/bin/nano su -c /usr/sbin/visudo
<<<nano opens /etc/sudoers and I can edit it>>>
visudo: /etc/sudoers.tmp unchanged
@loafer. Agreed that it's odd. Here is my .bashrc - nothing in there that would account of this.
# cat ~/.bashrc
alias nets="netstat -nlpt"
alias nets2="lsof -i"
alias ll="ls -lh"
alias rm="rm -i"
alias mv="mv -i"
alias pp="powerpill -Syu"
# Check for an interactive session
[ -z "$PS1" ] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
PATH=$PATH:/root/bin
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
@ graysky
Did you edit /etc/sudoers or did you just open it?
Offline
What happens when you run vi from the cmd line? Try just vi and again using the full path.
It looks to me (as above) that the error is because vi is exiting immediately. nano is giving the correct response - assuming you didn't edit the file when you had it opened (which is why karol asked about that). So the question is why vi is closing straight away. I'd look into the vi aspect first to make sure it is/isn't related to visudo or just a vi issue. If you see what I mean.
Last edited by skanky (2010-09-06 21:30:09)
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
What if you simply delete the file? Does it keep occuring?
Offline
What if you simply delete the file? Does it keep occuring?
Which file? /etc/sudoers.tmp? It's created when you type 'visudo' and removed when you exit it.
Offline