You are not logged in.

#1 2010-09-06 11:48:19

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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 packagesZsh and other configs

Offline

#2 2010-09-06 12:04:32

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

sudo visudo?


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#3 2010-09-06 12:06:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

Stebalien wrote:

sudo visudo?

No, just ran visudo as root as I always do.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#4 2010-09-06 12:19:15

Stebalien
Member
Registered: 2010-04-27
Posts: 1,237
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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)


Steven [ web : git ]
GPG:  327B 20CE 21EA 68CF A7748675 7C92 3221 5899 410C
Do not email: honeypot@stebalien.com

Offline

#5 2010-09-06 12:21:01

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

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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

#6 2010-09-06 12:54:31

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

@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 packagesZsh and other configs

Offline

#7 2010-09-06 13:07:11

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

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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

#8 2010-09-06 13:22:32

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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 packagesZsh and other configs

Offline

#9 2010-09-06 14:26:52

R00KIE
Forum Fellow
From: Between a computer and a chair
Registered: 2008-09-14
Posts: 4,734

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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

#10 2010-09-06 14:28:51

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

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

R00KIE wrote:

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

#11 2010-09-06 14:44:16

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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 packagesZsh and other configs

Offline

#12 2010-09-06 16:15:01

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

What if you run "EDITOR=vi visudo"?

Offline

#13 2010-09-06 16:28:54

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

EDIT: Sorry, I misread the bug report I linked to. tongue

Last edited by cesura (2010-09-06 16:30:12)

Offline

#14 2010-09-06 17:25:47

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

anonymous_user wrote:

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 packagesZsh and other configs

Offline

#15 2010-09-06 17:27:55

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

Well I meant run "EDITOR=vi visudo" as one command.

Offline

#16 2010-09-06 18:31:27

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

anonymous_user wrote:

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 packagesZsh and other configs

Offline

#17 2010-09-06 18:32:34

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,543

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

do you have vi and ex installed?

Offline

#18 2010-09-06 18:34:36

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

skunktrader wrote:

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 packagesZsh and other configs

Offline

#19 2010-09-06 18:53:57

yejun
Member
Registered: 2009-10-21
Posts: 66

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

How about

EDITOR=/usr/bin/nano su -c /usr/sbin/visudo

Last edited by yejun (2010-09-06 19:15:38)

Offline

#20 2010-09-06 19:55:27

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

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

graysky wrote:
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

#21 2010-09-06 20:02:53

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,600
Website

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

@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 packagesZsh and other configs

Offline

#22 2010-09-06 20:04:18

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

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

@ graysky
Did you edit /etc/sudoers or did you just open it?

Offline

#23 2010-09-06 20:54:08

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

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

#24 2010-09-06 21:23:17

cesura
Package Maintainer (PM)
From: Tallinn, Estonia
Registered: 2010-01-23
Posts: 1,867

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

What if you simply delete the file? Does it keep occuring?

Offline

#25 2010-09-06 21:29:30

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

Re: visudo no longer runs - visudo: /etc/sudoers.tmp unchanged [SOLVED]

itsbrad212 wrote:

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

Board footer

Powered by FluxBB