?
Solved

cannot login to ssh...urgent

Posted on 2004-11-15
47
Medium Priority
?
834 Views
Last Modified: 2013-12-15
SSH (is up and runing) is not letting me in.

I have direct root disabled but the user is in the usergroup and I logged in with user/password fine. I type su -l and it asks for root password of course, typed that and enter...but then nothing happens just breaks a new line and no text.

su -l
su -
su

all give same error

I enter a few times and get "bad message".

example:

-bash-2.05b$ su -
Password:





bad message
-bash-2.05b$

The space is me pressing enter 3-4 times until I get "bad message".

How do I fix this?

Fedora Core
0
Comment
Question by:SecretAgentOnline
  • 18
  • 10
  • 9
  • +1
44 Comments
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12585159
What is $LANG set to? This looks vageuely like a) you're giving the wrong password, and b) su can't find the language-specific message catalogs to tell you.
0
 

Author Comment

by:SecretAgentOnline
ID: 12585176
How am I supposed to know what $LANG is set to if I cannot logint to SSH?

I am not using the wrong password as I can login to WHM
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12585301
echo $LANG in the same environment you're doing the su in.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:SecretAgentOnline
ID: 12585323
en_US.UTF-8
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12585460
Looks like it's at least close to reasonable.
Might want to try

LANG=en_US su

or

LANG=C su

just to make sure.
0
 

Author Comment

by:SecretAgentOnline
ID: 12585491
same problem
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12586725
after you get the bad message line, which user are you?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12586827
Hmm, good point. Perhaps it actually worked... Try the 'id' command to check.
0
 

Author Comment

by:SecretAgentOnline
ID: 12587006
I'm still the user that is included in the wheelgroup, not yet root but I am trying to get into root :)

Also, what "id" command are you talking about?
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12587133
The command is simply called 'id'. It tells you what your real and effective user-id and groups are.
0
 

Author Comment

by:SecretAgentOnline
ID: 12587156
I ran id and got:

uid=32003(magik) gid=32005(magik) groups=32005(magik),10(wheel)
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12587282
Was that after an 'su'?
0
 

Author Comment

by:SecretAgentOnline
ID: 12587310
No on bash prompt
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12587438
Need to do this after an attempted 'su' so we know whether the su is actually failing, or just complaining.
0
 

Author Comment

by:SecretAgentOnline
ID: 12587457
I'm frustrated lol....

I ran su root and got the bad message error again after clicking enter a few times

I even ran su "username" and same thing
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 12590693
How you direct disable the root? I think that's related to why you can't su.

or have you try enable the root and do the su?
0
 

Author Comment

by:SecretAgentOnline
ID: 12590706
It has nothing to do with disabling direct root login. I have done that on 20+ servers of mine without a problem.

Its just that someone installed webmin control panel and affected ssh root login somehow.
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12591156
can you login as root and then su to another user?
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 12591182
GeG if root direct disabled I don't think can use the root to login to the server.

SecretAgentOnline, have you try to uninstall the webmin and su again?

to uninstall webmin just run the command /etc/webmin/uninstall.sh .
If you have installed the RPM version of Webmin, you can also use rpm -e webmin, or if you have installed the Solaris package you can use pkgrm WSwebmin .

by doing this at lease you can test is it really webmin make your ssh can't use the su to login.

hope can give you more idea :)

0
 

Author Comment

by:SecretAgentOnline
ID: 12591191
here's the results (in bash)

-bash: /etc/webmin/uninstall.sh: No such file or directory
-bash-2.05b$ dir
fantastico_admin_settings  public_ftp   webmin        webmin.tar
fantastico_files           public_html  webminconfig  www
mail                       tmp          webmin_log
-bash-2.05b$
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 12591231
be sure the webmin is not installed by RPM.

try to look for the webmin directory by using 'find / -name webmin -depth -print', so after you find the directory of webmin, try go into that directory and do the uninstall.sh by ./uninstall.sh

are you using BSD?? like freeBSD or openBSD??

0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12591255
@paullamhkg
why not login via telnet (or keyboard ;) )
How do you think he will uninstall webmin without being root?
I was wondering if the problem was the authentication or some ssh execution problem.

@SAO
can you become root in any way?
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 12591382
_GeG_  I'm not sure the telnet is enable or not, you got to ask SecretAgentOnline, but normally we will disable telnet and use the ssh.

That's the most difficult part, the user got to become root before uninstall anything, but seem SecretAgentOnline can't become root, so it's really difficult to fix ;(

There is a walk around is using the knoppix linux and boot up the server and using the root of knoppix to backup the passwd or related files, and recreate a new files in the server and reboot, so that at lease it can enable the root by editing the passwd or the config file(s).

I think now without the root login there nothing we can do.

That's also why I wanna to know which OS/Linux SecretAgentOnline is using.
0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12593797
Here's a thought... Have you trying directly logging in as root on the physical console? Perhaps the root account is 'locked'..
0
 

Author Comment

by:SecretAgentOnline
ID: 12596787
I do not have serial console available as this is a leased server. I have Fedora Core 1 on this server with cPanel.
Telnet is also disabled.

0
 
LVL 14

Expert Comment

by:chris_calabrese
ID: 12596867
If the root account is locked, the only way you'll be able to login is via the hard console. If this is in a hosted location (which I think is what you mean by "a leased server"), whomever hosts it will have to login on the hard console and reset the root account.
0
 

Author Comment

by:SecretAgentOnline
ID: 12596937
Well I have WHM, wouldn't that help? I resetted the password and did a graceful reboot. I'm going to test now anyway
0
 

Author Comment

by:SecretAgentOnline
ID: 12596946
Didn't work :(
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12597540
what is WHM?
0
 

Author Comment

by:SecretAgentOnline
ID: 12597939
cpanel's web host manager (admin area)
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12601087
you can login with cpanet as root? cpanet has a ssh feature, maybe you can use this.
If you are sure that it is not only a wrong password, i am afraid that the only options you have are the techs of your hoster, either to login and reset the ssh options to a reasonable default, or to have your server reinstalled.
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12601097
Or maybe one last chance...
... have you sudo installed, and has any user permission to use root rights in /etc/sudoers?
0
 

Author Comment

by:SecretAgentOnline
ID: 12601192
I've heard of sudo but not familiar what it is. Will this work in bash prompt?

Also, there are so many rpm's in WHM too. Maybe if I reinstalled *something* it may fix it???
0
 

Author Comment

by:SecretAgentOnline
ID: 12601195
-bash-2.05b$ dir
fantastico_admin_settings  public_ftp   webmin        webmin.tar
fantastico_files           public_html  webminconfig  www
mail                       tmp          webmin_log
-bash-2.05b$ cd /etc
-bash-2.05b$ locate sudo
warning: locate: could not open database: /var/lib/slocate/slocate.db: Permission denied
warning: You need to run the 'updatedb' command (as root) to create the database.
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12601217
if you haven't set up sudo yet, it won't help you.
And you will probably not be able to install *something* without being root.
btw have you tried to ssh to localhost?

bash$ ssh localhost

maybe you can login as root from localhost
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 12601267
Oh missing so many things here, got lots of stuff to do :(

leased server mean you lease it physically located in your area, or remotely hold by a service provider??

If it's remotely in your service provider, can you ask your them to help? ask them to login as root and removed/adjust/re config/etc... for you?

if it's physically located in your area, do you allow to do anything in the server?

without the root it's hard to re config/fix the problem.

0
 

Author Comment

by:SecretAgentOnline
ID: 12601298
-bash-2.05b$ ssh localhost
The authenticity of host 'localhost (127.0.0.1)' can't be established.
RSA key fingerprint is 7a:46:73:8e:f4:43:8c:75:dc:8f:fb:79:bf:e4:be:4e.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
myuser@localhost's password:
Permission denied, please try again.
myuser@localhost's password:
-bash-2.05b$ su -l
Password:





bad message
-bash-2.05b$
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12601343
sorry, try
bash$ ssh root@localhost
0
 

Author Comment

by:SecretAgentOnline
ID: 12601350
-bash-2.05b$ ssh root@localhost
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
Permission denied, please try again.
root@localhost's password:
0
 
LVL 9

Expert Comment

by:_GeG_
ID: 12601389
this could be a lot of things (badly configured ssh, bad root password, pam problem,...), but none that you change without being root. I hope you have a good backup, options see above :(
0
 
LVL 12

Expert Comment

by:paullamhkg
ID: 12601675
so you can physically access the server, have you try to run into rescue mode and do the fix there?? that is when you got the 'linux:' prompt type 'linux rescue' and it will ask you the root password, try login, if successfully login, there should be the problem of the root itself, so try to uninstall the webmin or other unuse stuff, or reconfig the ssh in /etc/ssh.conf and restart.
0
 

Author Comment

by:SecretAgentOnline
ID: 12622023
this is a leased server, I have no serial console, kvm is very expensive and I do not have physical ability of course to be there
0
 
LVL 12

Accepted Solution

by:
paullamhkg earned 1000 total points
ID: 12622800
So I think you have to ask your service provider to help, without geting in the system as root we can't provide any suggest sorry.
0
 
LVL 9

Assisted Solution

by:_GeG_
_GeG_ earned 1000 total points
ID: 12624224
I had a similar problem once when I was trying to setup gentoo on a leased server which was delivered with suse. I couldn't restart it any more. So I asked the system provider to reset things to the condition like it was when I rented the server. This is no work for them, because it works automatically, so they did it for me without charge (I only needed it once ;)).
I think for you this will be the cheapest solution.
0

Featured Post

NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month16 days, 14 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question