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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
02-22-2012, 10:44 AM
|
#16
|
Member
Registered: Nov 2011
Location: Germany, Bavaria, Nueremberg area
Distribution: openSUSE, Debian, LFS
Posts: 205
Rep:
|
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?
|
|
|
02-22-2012, 05:59 PM
|
#17
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
Quote:
Originally Posted by uhelp
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
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 ~]#
|
|
|
02-22-2012, 06:15 PM
|
#18
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
Quote:
Originally Posted by uhelp
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.
|
|
|
02-22-2012, 07:10 PM
|
#19
|
Member
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 215
Rep:
|
Quote:
Originally Posted by mmorto89
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.
|
02-22-2012, 07:13 PM
|
#20
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
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 ~]#
|
|
|
02-22-2012, 08:03 PM
|
#21
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
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?
|
|
|
02-22-2012, 08:12 PM
|
#22
|
Member
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 215
Rep:
|
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
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 08:14 PM.
|
|
|
02-22-2012, 08:15 PM
|
#23
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
Quote:
Originally Posted by savona
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.
|
|
|
02-22-2012, 08:17 PM
|
#24
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
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 08:20 PM.
|
|
|
02-22-2012, 08:36 PM
|
#25
|
Member
Registered: Mar 2011
Location: Bellmawr, NJ
Distribution: Red Hat / Fedora
Posts: 215
Rep:
|
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.
|
|
|
02-23-2012, 02:45 AM
|
#26
|
LQ Newbie
Registered: Feb 2012
Posts: 15
Original Poster
Rep: 
|
Quote:
Originally Posted by savona
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.
|
|
|
08-24-2012, 04:14 PM
|
#28
|
LQ Newbie
Registered: Aug 2012
Posts: 1
Rep: 
|
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).
|
|
|
08-25-2012, 12:14 AM
|
#29
|
LQ Addict
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841
|
Quote:
Originally Posted by buenasolas
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.
|
|
|
All times are GMT -5. The time now is 10:35 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|