LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
LinkBack Search this Thread
Old 09-14-2010, 05:06 PM   #16
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 673

Rep: Reputation: 57

Quote:
Originally Posted by cnmoore View Post
Sorry, I don't know what you mean about "SSH'ing to root requires the root account to be enabled. Bad. When you SSH in the first time the connection is encrypted already. "
He is saying that being able to ssh in as root in any way, shape or form, still requires you to allow root to login remotely.

Which is bad.

Quote:
Originally Posted by cnmoore View Post
How would a person log in as root if root wasn't enabled? You've lost me. And are you saying that su root is better than SSH root?
A user wouldn't login as root. That is the point. You login as your regular user, and then use something to escalate your privileges. (su, sudo)

Yes su root is better the ssh root because you aren't connecting remote as root. However sudo root is even better than su root...

nomb
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 09-14-2010, 06:23 PM   #17
cnmoore
Member
 
Registered: Sep 2010
Location: Sunnyvale, CA
Distribution: CentOS 5.5
Posts: 82

Original Poster
Rep: Reputation: 0
How am I connecting remote if I am connecting via SSH to another name on the same server? Nothing goes out through PuTTY, it's all happening within the server. Not even going out on the hosts's LAN. Using su requires entering a password which gets transitted via PuTTY.

Edit: I found sudo. Need to be root to see it. So I will add 'me' to the /root/sudoers.txt?

The existing entries look like this, which confuses me. Name1 and name2 are host's techs.
root ALL=(ALL) ALL
name1 ALL = PASSWD: ALL
name1 ALL = NOPASSWD: ADMIN
name2 ALL = NOPASSWD: ADMIN
name2 ALL = PASSWD: ALL
admin ALL = NOPASSWD: ADMIN

Would I add
me ALL = NOPASSWD: ROOT

Last edited by cnmoore; 09-14-2010 at 06:42 PM. Reason: I found sudo
 
Old 09-14-2010, 09:59 PM   #18
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 13.37
Posts: 4,021

Rep: Reputation: 125Reputation: 125
You may be working locally, but unless your /etc/ssh/sshd_config file contains "PermitRootLogin no" (my version defaults to yes unless you specifically set it to no) then someone can remotely try to access the root account by guessing the password.

To set up sudo I use the visudo command. I don't recommend using the keywords ALL and NOPASSWD together since they provide full root access if someone guesses that account's password.

Last edited by gilead; 09-14-2010 at 10:00 PM.
 
Old 09-14-2010, 10:24 PM   #19
cnmoore
Member
 
Registered: Sep 2010
Location: Sunnyvale, CA
Distribution: CentOS 5.5
Posts: 82

Original Poster
Rep: Reputation: 0
Where do I get visudo?

Code:
[root@www sbin]# rpm -ql sudo
package sudo is not installed
[root@www sbin]#
 
Old 09-15-2010, 09:09 AM   #20
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 673

Rep: Reputation: 57
If sudo is installed it should already be there as well. But visudo needs to be ran with root privileges. Which also means it should be in one of the sbins.

nomb
 
Old 09-15-2010, 02:04 PM   #21
cnmoore
Member
 
Registered: Sep 2010
Location: Sunnyvale, CA
Distribution: CentOS 5.5
Posts: 82

Original Poster
Rep: Reputation: 0
Do you suppose there is some good reason why our host has not installed sudo? I could ask them but I'm trying to avoid entering new ticket.
 
Old 09-15-2010, 02:30 PM   #22
dcellis1950
LQ Newbie
 
Registered: Nov 2009
Posts: 14

Rep: Reputation: 2
Add

PermitRootLogin no

to your ssh_config file.

If I remember correctly there was a keyword for this setting that allowed access via a key file, but denied password access to root. I think the keyword is without-password.
 
Old 09-15-2010, 02:32 PM   #23
cnmoore
Member
 
Registered: Sep 2010
Location: Sunnyvale, CA
Distribution: CentOS 5.5
Posts: 82

Original Poster
Rep: Reputation: 0
I don't dare do that - danger of blocking my hosts's techies. But I'm sure it is good advice.
 
Old 09-15-2010, 02:37 PM   #24
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,697
Blog Entries: 1

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Quote:
Originally Posted by cnmoore View Post
Do you suppose there is some good reason why our host has not installed sudo? I could ask them but I'm trying to avoid entering new ticket.

None that I can think of other than they are trying to restrict who has root access. However, that is REALLY self-defeating as without sudo, someone is more likely to hand out the root password. Sudo was designed to prevent exactly that.

I'd ask for it to be installed. It just seems very wrong that it wasn't by default.
 
Old 09-15-2010, 07:00 PM   #25
cnmoore
Member
 
Registered: Sep 2010
Location: Sunnyvale, CA
Distribution: CentOS 5.5
Posts: 82

Original Poster
Rep: Reputation: 0
Smile

I hate to annoy our host. They give us a very special low monthly fee for our dedicated server, because the host's owner hates malware and because we are all volunteers and the forum has no income other than donations.

I'm marking this SOLVED because it's getting so long. In the future I will try to keep my threads more focused.
 
Old 09-16-2010, 07:12 AM   #26
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,697
Blog Entries: 1

Rep: Reputation: 374Reputation: 374Reputation: 374Reputation: 374
Quote:
I hate to annoy our host. They give us a very special low monthly fee for our dedicated server, because the host's owner hates malware and because we are all volunteers and the forum has no income other than donations.
I understand your reluctance to risk annoying someone who is giving you a good deal, but if your host hates malware, then they should understand the need for tools like sudo.
 
  


Reply

Tags
attempted, login, ssh


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
powertop reporting a huge number of acpi interrupts gawhelan Linux - Laptop and Netbook 5 01-15-2009 02:12 AM
find the total number of pseudo terminals of all logins RajRed Linux - General 5 04-18-2006 04:30 AM
server listening on port 22 and attempted logins from an unauthorized user kevinlyfellow Linux - Networking 2 03-24-2005 10:41 PM
attempted logins and shutdowns on tty1 tw001_tw Linux - Security 7 08-03-2004 08:29 PM
Problem with huge number of pthreads Berng Programming 7 12-17-2003 07:33 AM


All times are GMT -5. The time now is 04:30 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration