Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
|
|
08-03-2007, 02:46 AM
|
#1
|
LQ Newbie
Registered: Aug 2007
Posts: 5
Rep:
|
How i can remote login using root user ?
I 'm using PuTTY to remote login with root user to my linux server(Fedora core 2, Open SSH) . I changed password and can't remmber . So, i direct login to my server in single mode(some one in forum has instructed me). I using passwd to change root password (some topic has instructed me how to recover password). Right now, i can direct login to server in root user, but can't remote login.
I can remote login with an old normal user, but can't su like before!
I checked sshd_config, and PermitRootLogin yes already.
What is the problem?
Please please help me!, i need it so bad!(i 'm a newbie in linux) (thanks so much for any advice! )
Sorry because of my poor english!
Last edited by xitrum1110; 08-03-2007 at 03:52 AM.
|
|
|
08-03-2007, 03:11 AM
|
#2
|
Member
Registered: May 2004
Location: Karlsruhe, Germany
Distribution: debian, gentoo, os x (darwin), ubuntu
Posts: 940
Rep:
|
if i was you, i'd login locally, install sudo, edit the sudoers file (using visudo) and add my normal username.
then login from remote site, using the normal username and using sudo gain root privileges.
though this aint really answering your question, it's what is commonly done... as it is discouraged to login as root from a remote site.
|
|
|
08-03-2007, 03:12 AM
|
#3
|
LQ Guru
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131
Rep:
|
I would definitely set AllowRootLogin No -- allowing root logins trough SSH means allowing anybody do brute force attacks against root account, for a start. Generally just *not* a good idea. Instead log in as a regular user and use either su or sudo depending on which one you have or prefer. Definitely, if you can, sudo instead of su (means configuring /etc/sudoers and possibly group 'sudo').
Another matter is why 'su' doesn't work. It really really should. How about if you run 'su' as root to become some other user?
does that work, or not? What error you get if you do that on an account where it "doesn't work"? Better get that fixed first..
|
|
|
08-03-2007, 03:18 AM
|
#4
|
Member
Registered: Apr 2006
Location: Sweden
Distribution: CentOS, RHEL, SourceMage, OpenBSD
Posts: 40
Rep:
|
Have you made sure the line is not commented? It means you need to remove the "#" before the line because otherwise it is not read. You also need to restart the server for the changes to take effect (IIRC):
Code:
kill -HUP $(cat /var/run/sshd.pid)
But I don't know why you can't su from your user. Perhaps if you explained exactly what you did (which password you changed and so on) then we might be able to help you.
[EDIT]But as has been said, permitting root login can be dangerous if you have a weak password on the root account[EDIT]
Last edited by bakfupai; 08-03-2007 at 03:21 AM.
|
|
|
08-03-2007, 03:51 AM
|
#5
|
LQ Newbie
Registered: Aug 2007
Posts: 5
Original Poster
Rep:
|
Thanks so so so much for all your quick replies!
bakfupai said:"It means you need to remove the "#" "----> yes, it was already removed and i restarted server too!
b0uncer said:"Another matter is why 'su' doesn't work. It really really should. How about if you run 'su' as root to become some other user?
does that work"----->Yes that worked if i direct login to server.
Nathanael: Yeah, i tried sudo too, but it don't work
When i direct login to server I can use su root or whaterver user!
But when i remote login by a user, i can't su root , it displays :"su: incorrect password" but i can use that password to direct login to server in root user.
I have just create a new user.
And i can't remote login with that user too!
|
|
|
08-03-2007, 03:51 AM
|
#6
|
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733
|
I'll just offer a small clarification to what Nathanael wrote. Rather than adding your name in the sudoers fle (with visudo), make your self a member of the "wheel" group and uncomment the line in the sudoers file to allow yourself to use sudo.
|
|
|
08-03-2007, 04:03 AM
|
#7
|
LQ Newbie
Registered: Aug 2007
Posts: 5
Original Poster
Rep:
|
i forgot to explain what i did when i recover my root passwd:
Here is what i did:
I restart, in grub menu i press 'e', chose kernel, and press 'e' again , after that i insert an space and the number one '1' then press ENTER and 'b' and ENTER again.
Now i 'm in single mode
i type: passwd
and change root passwd
then restart
I had followed instruction from : http://www.go2linux.org/node/5
|
|
|
All times are GMT -5. The time now is 01:36 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
|
|