LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-22-2012, 11:44 AM   #16
uhelp
Member
 
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205

Rep: Reputation: 43

So the problem seems to be merely a sshd conf issue.

What kind of authentication is this server using?
in other words: what is the __exact__ command Putty uses to log in as root?

And please paste the config of sshd.

It has been working so who or what changed something.
What activities did occur when it stopped working?
 
Old 02-22-2012, 06:59 PM   #17
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by uhelp View Post
Which services does this machine offer?
It offers a ssh as you log in with Putty, I think.
Is there a web server running?
All kind of servers I'd like to know.

It got a strange layout at /home anyway..

First try to log in as root and change the password for mike
Code:
passwd mike
Then try to log in as mike with the new password.

If it doesn't help, log in again as root and do this:
Code:
cat /etc/pam.d/passwd
and paste the output here.
Is this what your looking for?

Code:
[root@server ~]# chkconfig --list
NetworkManager  0:off   1:off   2:off   3:off   4:off   5:off   6:off
acpid           0:off   1:off   2:on    3:on    4:on    5:on    6:off
anacron         0:off   1:off   2:on    3:on    4:on    5:on    6:off
atd             0:off   1:off   2:off   3:on    4:on    5:on    6:off
auditd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
autofs          0:off   1:off   2:off   3:on    4:on    5:on    6:off
avahi-daemon    0:off   1:off   2:off   3:on    4:on    5:on    6:off
avahi-dnsconfd  0:off   1:off   2:off   3:off   4:off   5:off   6:off
capi            0:off   1:off   2:off   3:off   4:off   5:off   6:off
conman          0:off   1:off   2:off   3:off   4:off   5:off   6:off
cpuspeed        0:off   1:on    2:on    3:on    4:on    5:on    6:off
crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off
cups            0:off   1:off   2:on    3:on    4:on    5:on    6:off
da-popb4smtp    0:off   1:off   2:on    3:on    4:on    5:on    6:off
directadmin     0:off   1:off   2:on    3:on    4:on    5:on    6:off
dnsmasq         0:off   1:off   2:off   3:off   4:off   5:off   6:off
dovecot         0:off   1:off   2:on    3:on    4:on    5:on    6:off
exim            0:off   1:off   2:on    3:on    4:on    5:on    6:off
firstboot       0:off   1:off   2:off   3:on    4:off   5:on    6:off
gpm             0:off   1:off   2:on    3:on    4:on    5:on    6:off
haldaemon       0:off   1:off   2:off   3:on    4:on    5:on    6:off
hplip           0:off   1:off   2:on    3:on    4:on    5:on    6:off
httpd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
ip6tables       0:off   1:off   2:on    3:on    4:on    5:on    6:off
ipmi            0:off   1:off   2:off   3:off   4:off   5:off   6:off
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
irda            0:off   1:off   2:off   3:off   4:off   5:off   6:off
irqbalance      0:off   1:off   2:on    3:on    4:on    5:on    6:off
iscsi           0:off   1:off   2:off   3:on    4:on    5:on    6:off
iscsid          0:off   1:off   2:off   3:on    4:on    5:on    6:off
isdn            0:off   1:off   2:on    3:on    4:on    5:on    6:off
jexec           0:on    1:on    2:on    3:on    4:on    5:on    6:on
kdump           0:off   1:off   2:off   3:off   4:off   5:off   6:off
kudzu           0:off   1:off   2:off   3:on    4:on    5:on    6:off
lisa            0:off   1:off   2:off   3:off   4:off   5:off   6:off
lm_sensors      0:off   1:off   2:on    3:on    4:on    5:on    6:off
lvm2-monitor    0:off   1:on    2:on    3:on    4:on    5:on    6:off
mcstrans        0:off   1:off   2:on    3:on    4:on    5:on    6:off
mdmonitor       0:off   1:off   2:on    3:on    4:on    5:on    6:off
mdmpd           0:off   1:off   2:off   3:off   4:off   5:off   6:off
messagebus      0:off   1:off   2:off   3:on    4:on    5:on    6:off
multipathd      0:off   1:off   2:off   3:off   4:off   5:off   6:off
mysqld          0:off   1:off   2:on    3:on    4:on    5:on    6:off
named           0:off   1:off   2:off   3:off   4:off   5:off   6:off
netconsole      0:off   1:off   2:off   3:off   4:off   5:off   6:off
netfs           0:off   1:off   2:off   3:on    4:on    5:on    6:off
netplugd        0:off   1:off   2:off   3:off   4:off   5:off   6:off
network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
nfs             0:off   1:off   2:off   3:off   4:off   5:off   6:off
nfslock         0:off   1:off   2:off   3:on    4:on    5:on    6:off
nscd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
ntpd            0:off   1:off   2:off   3:off   4:off   5:off   6:off
oddjobd         0:off   1:off   2:off   3:off   4:off   5:off   6:off
pcscd           0:off   1:off   2:on    3:on    4:on    5:on    6:off
portmap         0:off   1:off   2:off   3:on    4:on    5:on    6:off
proftpd         0:off   1:off   2:off   3:on    4:on    5:on    6:off
psacct          0:off   1:off   2:off   3:off   4:off   5:off   6:off
rawdevices      0:off   1:off   2:off   3:on    4:on    5:on    6:off
rdisc           0:off   1:off   2:off   3:off   4:off   5:off   6:off
readahead_early 0:off   1:off   2:on    3:on    4:on    5:on    6:off
readahead_later 0:off   1:off   2:off   3:off   4:off   5:on    6:off
restorecond     0:off   1:off   2:on    3:on    4:on    5:on    6:off
rpcgssd         0:off   1:off   2:off   3:on    4:on    5:on    6:off
rpcidmapd       0:off   1:off   2:off   3:on    4:on    5:on    6:off
rpcsvcgssd      0:off   1:off   2:off   3:off   4:off   5:off   6:off
saslauthd       0:off   1:off   2:off   3:off   4:off   5:off   6:off
setroubleshoot  0:off   1:off   2:off   3:on    4:on    5:on    6:off
smartd          0:off   1:off   2:on    3:on    4:on    5:on    6:off
smb             0:off   1:off   2:off   3:off   4:off   5:off   6:off
sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off
startips        0:off   1:off   2:on    3:on    4:on    5:on    6:off
svnserve        0:off   1:off   2:off   3:off   4:off   5:off   6:off
syslog          0:off   1:off   2:on    3:on    4:on    5:on    6:off
vncserver       0:off   1:off   2:off   3:off   4:off   5:off   6:off
wdaemon         0:off   1:off   2:off   3:off   4:off   5:off   6:off
winbind         0:off   1:off   2:off   3:off   4:off   5:off   6:off
wpa_supplicant  0:off   1:off   2:off   3:off   4:off   5:off   6:off
xfs             0:off   1:off   2:on    3:on    4:on    5:on    6:off
ypbind          0:off   1:off   2:off   3:off   4:off   5:off   6:off
yum-updatesd    0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@server ~]#
 
Old 02-22-2012, 07:15 PM   #18
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by uhelp View Post
So the problem seems to be merely a sshd conf issue.

What kind of authentication is this server using?
in other words: what is the __exact__ command Putty uses to log in as root?

And please paste the config of sshd.

It has been working so who or what changed something.
What activities did occur when it stopped working?
I don't know what command putty uses to login?

How do I view the sshd config?

I have only had the server for a dew days and the server service setup everything up except the vnc server I did that. As long as I had the server I've had this issue.
 
Old 02-22-2012, 08:10 PM   #19
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 195

Rep: Reputation: 50
Quote:
Originally Posted by mmorto89 View Post
I don't know what command putty uses to login?

How do I view the sshd config?

I have only had the server for a dew days and the server service setup everything up except the vnc server I did that. As long as I had the server I've had this issue.
to view the sshd config:

cat /etc/ssh/sshd_config
 
1 members found this post helpful.
Old 02-22-2012, 08:13 PM   #20
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Code:
[root@server ~]# cat /etc/ssh/sshd_config
#       $OpenBSD: sshd_config,v 1.73 2005/12/06 22:38:28 reyk Exp $

# This is the sshd server system-wide configuration file.  See
# sshd_config(5) for more information.

# This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin

# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented.  Uncommented options change a
# default value.

#Port 22
#Protocol 2,1
Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::

# HostKey for protocol version 1
#HostKey /etc/ssh/ssh_host_key
# HostKeys for protocol version 2
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_dsa_key

# Lifetime and size of ephemeral version 1 server key
#KeyRegenerationInterval 1h
#ServerKeyBits 768

# Logging
# obsoletes QuietMode and FascistLogging
#SyslogFacility AUTH
SyslogFacility AUTHPRIV
#LogLevel INFO

# Authentication:

#LoginGraceTime 2m
#PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6

#RSAAuthentication yes
#PubkeyAuthentication yes
#AuthorizedKeysFile     .ssh/authorized_keys

# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
#RhostsRSAAuthentication no
# similar for protocol version 2
#HostbasedAuthentication no
# Change to yes if you don't trust ~/.ssh/known_hosts for
# RhostsRSAAuthentication and HostbasedAuthentication
#IgnoreUserKnownHosts no
# Don't read the user's ~/.rhosts and ~/.shosts files
#IgnoreRhosts yes

# To disable tunneled clear text passwords, change to no here!
#PasswordAuthentication yes
#PermitEmptyPasswords no
PasswordAuthentication yes

# Change to no to disable s/key passwords
#ChallengeResponseAuthentication yes
ChallengeResponseAuthentication no

# Kerberos options
#KerberosAuthentication no
#KerberosOrLocalPasswd yes
#KerberosTicketCleanup yes
#KerberosGetAFSToken no

# GSSAPI options
#GSSAPIAuthentication no
GSSAPIAuthentication yes
#GSSAPICleanupCredentials yes
GSSAPICleanupCredentials yes

# Set this to 'yes' to enable PAM authentication, account processing,
# and session processing. If this is enabled, PAM authentication will
# be allowed through the ChallengeResponseAuthentication mechanism.
# Depending on your PAM configuration, this may bypass the setting of
# PasswordAuthentication, PermitEmptyPasswords, and
# "PermitRootLogin without-password". If you just want the PAM account and
# session checks to run without PAM authentication, then enable this but set
# ChallengeResponseAuthentication=no
#UsePAM no
UsePAM yes

# Accept locale-related environment variables
AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES
AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT
AcceptEnv LC_IDENTIFICATION LC_ALL
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding no
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PrintMotd yes
#PrintLastLog yes
#TCPKeepAlive yes
#UseLogin no
#UsePrivilegeSeparation yes
#PermitUserEnvironment no
#Compression delayed
#ClientAliveInterval 0
#ClientAliveCountMax 3
#ShowPatchLevel no
#UseDNS yes
#PidFile /var/run/sshd.pid
#MaxStartups 10
#PermitTunnel no
#ChrootDirectory none

# no default banner path
#Banner /some/path

# override default of no subsystems
Subsystem       sftp    /usr/libexec/openssh/sftp-server
AllowUsers root
AllowUsers admin
[root@server ~]#
 
Old 02-22-2012, 09:03 PM   #21
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
So this server has a control panel called directadmin. I've never used a control panel before and could this be the reason why I've been having so many issues with my users?
 
Old 02-22-2012, 09:12 PM   #22
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 195

Rep: Reputation: 50
Edit the /etc/ssh/sshd_config file and add:

AllowUsers mike

Also, you should not allow root to log in via ssh, to stop it (ONLY IF MIKE WORKS) change this line:


#PermitRootLogin yes

to

PermitRootLogin no

---------- Post added 02-22-12 at 09:13 PM ----------

Quote:
Originally Posted by mmorto89 View Post
So this server has a control panel called directadmin. I've never used a control panel before and could this be the reason why I've been having so many issues with my users?
I am not familiar with directadmin, but there is a user called admin thats allows to log in via SSH.

AllowUsers admin

Also, there is a user called "admin" in your /etc/passwd file. The UID is 501 so it was the first user created (after root):

admin:x:501:501::/home/admin:/bin/bash

Last edited by savona; 02-22-2012 at 09:14 PM.
 
Old 02-22-2012, 09:15 PM   #23
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by savona View Post
Edit the /etc/ssh/sshd_config file and add:

AllowUsers mike

Also, you should not allow root to log in via ssh, to stop it (ONLY IF MIKE WORKS) change this line:


#PermitRootLogin yes

to

PermitRootLogin no

---------- Post added 02-22-12 at 09:13 PM ----------



I am not familiar with directadmin, but there is a user called admin thats allows to log in via SSH.

AllowUsers admin
Well I think I use ssh to login to my terminal, so how would I get root access if I needed it?
and the username admin also does not work I already tried to login to that user and I changed the password for admin and still nothing.
 
Old 02-22-2012, 09:17 PM   #24
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
OH MY!!! IT WORKS!!! finnaly!!! thank you so much! but I'm still curious about my question above how would I get root access if I disable ssh for root?

EDIT: oh and I guess I was just putting the wrong password in for admin because it worked right after I changed it.

Last edited by mmorto89; 02-22-2012 at 09:20 PM.
 
Old 02-22-2012, 09:36 PM   #25
savona
Member
 
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 195

Rep: Reputation: 50
Disabling SSH for root just means root can not log in "remotely". Once you log in as Mike you can use the following command to "become" root.

su -

You will be prompted for the root password after issuing the above command.
 
Old 02-23-2012, 03:45 AM   #26
mmorto89
LQ Newbie
 
Registered: Feb 2012
Posts: 15

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by savona View Post
Disabling SSH for root just means root can not log in "remotely". Once you log in as Mike you can use the following command to "become" root.

su -

You will be prompted for the root password after issuing the above command.
Oh I wasn't sure if that would work. Thanks for the great advice and helping me fix that.
 
Old 02-23-2012, 03:53 AM   #27
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I'm not sure if this helps but I believe it was the original problem.
I hope I read this right.
http://www.cyberciti.biz/tips/linux-...to-system.html
 
Old 08-24-2012, 05:14 PM   #28
buenasolas
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Wow, late to the party, but I figured I'd comment on this. I was looking at your useradd commands, and it appears that you might not have created a home directory for your user. Can you verify if a user directory was created in /home(or wherever you have home directories). useradd -m $USERNAME will create a new account AND a new home directory for that user in the default location. This may be related to your problem(but you probably already have it figured out by now).
 
Old 08-25-2012, 01:14 AM   #29
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Quote:
Originally Posted by buenasolas View Post
Wow, late to the party, but I figured I'd comment on this. I was looking at your useradd commands, and it appears that you might not have created a home directory for your user. Can you verify if a user directory was created in /home(or wherever you have home directories). useradd -m $USERNAME will create a new account AND a new home directory for that user in the default location. This may be related to your problem(but you probably already have it figured out by now).
OP wasn't in ssh group I'm pretty sure of that.
 
  


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
Connect to Xterm terminal remotely fjkum Linux - Newbie 2 12-18-2008 01:10 AM
can't connect to any server through terminal restles.s Linux - Networking 8 08-22-2007 03:47 AM
Need Shell Script to allow user to connect to net through terminal Dralnu Linux - Networking 1 05-07-2006 10:31 AM
using fedora to connect to m$ terminal server jbzy3000 Fedora 6 03-05-2005 10:19 AM
root cannot connect to an X server in a terminal GameboyHippo Linux - Software 4 02-09-2004 11:25 AM


All times are GMT -5. The time now is 05:59 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