Sep 22, 2006
5
0
151
I followed the tutorial from: http://forums.cpanel.net/showthread.php?t=30159

And i also changed permitrootlogin to no

Note 1: If you would like to disable direct Root Login, scroll down until you find

#PermitRootLogin yes

and uncomment it and make it look like

PermitRootLogin no
I thought it was somthing else. Well, now i can't login through root. I can't telnet aswell. Is there any other way to enable root login again?
Please Help
 

chris74108

Well-Known Member
Apr 30, 2004
86
0
156
Unless you changed something you can probably just login as a regular user and type
su - enter
then when prompted rootpass

The wheel restriction only works if you change
/etc/pam.d/su

by uncommenting (remove the #)
#auth required /lib/security/$ISA/pam_wheel.so use_uid
to
auth required /lib/security/$ISA/pam_wheel.so use_uid

If by some chance you did make this change then dgbaker is right on.
 
Sep 22, 2006
5
0
151
Thanks guys.
I added regular user to wheel group. Then i logged in to ssh with that user and su to root.
Should i always login to root through su or change sshd_config to allow permitrootlogin.
Which is more Safer?
 

chris74108

Well-Known Member
Apr 30, 2004
86
0
156
LovelyNetworks said:
Thanks guys.
I added regular user to wheel group. Then i logged in to ssh with that user and su to root.
Should i always login to root through su or change sshd_config to allow permitrootlogin.
Which is more Safer?
su -
to root and disable root logins
 

Rogers

Registered
Feb 18, 2006
3
0
151
Europe
I have a similar problem. I set up SSH to only listen on a certain IP address. Last night my host changed my IP address and now I can't log in via SSH. How can I get to the /etc/ssh/sshd_config file to update the IP? Is there some way I can temporarily enable telnet or FTP for root access? Thanks.
 

Rogers

Registered
Feb 18, 2006
3
0
151
Europe
Thank you!! So easy when you know how... :eek:

I ran "/etc/rc.d/init.d/sshd restart" after I edited the sshd_config file which I guess then re-starts SSH with the new settings.
 

jayh38

Well-Known Member
Mar 3, 2006
1,213
0
166
Correct, each time you start / restart a service, its current config file is loaded.

glad you got it going