LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-08-2009, 11:12 PM   #1
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Rep: Reputation: 30
I can't sudo over SSH


When I do su and type the root password, all works great.

When I log in to the box physically, and open a root terminal, all works great.

When I do

user@DebianServer:~$ sudo nano sudoers

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.

[sudo] password for user:
user is not allowed to run sudo on DebianServer. This incident will be reported.

and here's what my sudoers file looks like


# /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.
#

Defaults env_reset

# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root ALL=(ALL) ALL
user All=NOPASSWD: ALL

# Uncomment to allow members of group sudo to not need a password
# (Note that later entries override this, so you might need to move
# it further down)
# %sudo ALL=NOPASSWD: ALL



What am I doing wrong?

BTW, this is "Linux version 2.6.26-2-686 (Debian 2.6.26-15lenny3) (dannf@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-25)) #1 SMP Thu May 28 15:39:35 UTC 2009"
 
Old 06-08-2009, 11:23 PM   #2
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Don't edit sudoers like that, it even tells you how to edit it.

What happens if you log in as
Code:
ssh root@DebianServer
 
Old 06-08-2009, 11:24 PM   #3
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
It works, since I haven't disabled root loging through ssh yet.
 
Old 06-08-2009, 11:27 PM   #4
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Well, okay- that means you at least have a back up, and it means ssh isn't affecting anything, its your environment. Do me a favour, capitalise that 'ALL' in sudoers, it may not make a difference; but it can't hurt.
 
Old 06-08-2009, 11:28 PM   #5
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
It already is
 
Old 06-08-2009, 11:31 PM   #6
jamescondron
Member
 
Registered: Jul 2007
Location: Scunthorpe, UK
Distribution: Ubuntu 8.10; Gentoo; Debian Lenny
Posts: 961

Rep: Reputation: 69
Not in that paste of yours it isn't
 
Old 06-08-2009, 11:34 PM   #7
SuperDude123
Member
 
Registered: Nov 2008
Posts: 158

Original Poster
Rep: Reputation: 30
Ah, now I see it.

I fixed it and problem solved

thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
A few noob questions about sudo and ssh... trist007 Linux - Newbie 6 02-09-2009 09:40 PM
ssh and sudo kutty_prasad Linux - General 7 05-13-2008 04:46 AM
commande execution with sudo(on ssh) yousmg Linux - Security 4 06-14-2007 12:04 PM
Sudo and ssh X11 fowarding Mike_the_Man Linux - General 1 05-04-2006 12:04 AM
sudo ethereal with ssh adamwenner Linux - Software 0 09-10-2004 03:21 PM


All times are GMT -5. The time now is 04:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration