
|
View Full Version : ssh on redhat 8.0
MasterBrian 12-04-2002, 07:44 AM Greetings,
whenever I log in as root when I'm sitting in front of the box I do not have any problems, but I'm unable to connect as root remotely... not even if I log in with a normal user... and then try to SU
I'm using a fresh and clean installation of RH8. any idea?
Thank you!
tazzy 12-04-2002, 09:07 AM Hello,
I always have that problem. You need to log in directly as root and not login as a subuser without root status. You could possibily change the settings on this as I know some systems have been changed so logging in as a specific subuser is required before you can even login as root. That feature is for additional security.
nozol 12-04-2002, 08:58 PM Just add that normal user to the wheel group. Just open /etc/group then add this user.
pico /etc/group
then you will find the line of the wheel group, something like
wheel:x:10:root
just make it something like
wheel:x:10:root, folan
where 'folan' is the normal user
then login using this user and su and you will gain root access.
hope this helps.
MasterBrian 12-06-2002, 11:36 AM THank you,
I've tryied but still I could'nt su as root :(
Any other idea?
nozol 12-06-2002, 02:26 PM Did it ask you for the root password? did you get any error messages?
sasha 12-06-2002, 02:34 PM Not being able to ssh as root is not a problem, it is smart setting in sshd_config
PermitRootLogin no
You can change it to yes if you realy want to and restart sshd for it to take effect.
MasterBrian 12-09-2002, 05:44 AM Thk you Sasha, but sshd_config is ok, root login are allowed, but still I cannot su :'(
Nozol, yes it says bad password and make me return to the user from where I give su command.
;(
nozol 12-09-2002, 05:47 AM Strange. Then check the password of the root user.
passwd root
Also try to issue the command
su root
instead of
su
MasterBrian 12-09-2002, 07:03 AM Nozol thank you very much, with passwd many things was changed. Now I'm able to connect via ssh, and login as root or give su command, but now I could'nt login on tty (directly on the keyboard of my linux box) as root, only as normal user, and still I could'nt su (from local), this is really really strange :(
nozol 12-09-2002, 07:16 AM This is strange!!!
Please check the file /etc/securetty, see if root still has access to the console.
chmod +s `which su`
should help
MasterBrian 12-09-2002, 07:38 AM Nozol, this is my /etc/securetty content:
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
It is wrong?
MasterBrian 12-09-2002, 07:39 AM Originally posted by Miha
chmod +s `which su`
should help
Thank Miha,
but I did'nt understood, can you explain it to me pls?
MasterBrian 12-09-2002, 07:44 AM I've found this file interesting, (I din't find it in my previous installation of redhat 7.2) but seems that everithing is commented here. can be usefull?
nozol 12-09-2002, 07:51 AM Originally posted by MasterBrian
Nozol, this is my /etc/securetty content:
vc/1
vc/2
vc/3
vc/4
vc/5
vc/6
vc/7
vc/8
vc/9
vc/10
vc/11
tty1
tty2
tty3
tty4
tty5
tty6
tty7
tty8
tty9
tty10
tty11
It is wrong?
This is correct.
It may sound strange, but, let's try
passwd root
from ssh this time, let see what happens.
Originally posted by MasterBrian
Thank Miha,
but I did'nt understood, can you explain it to me pls?
That means it will setup 'suid' bit on the su executable. If it is not suid from root, then you can't login to root via su. That's what you were/are getting, you can execute 'su' but it is saying that bad passwd.
MasterBrian 12-09-2002, 07:56 AM Ok, I've done it:
Changing password for user root.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
Ops, maybe I've found (thank Nozol) the problem, I've the password setup with some special characters, if I make a normal password (only with letters from A to Z) the logins work from both ssh and local, maybe I've setup a wrong keyboard driver on my linux box?
nozol 12-09-2002, 07:59 AM great, thank God!!
nozol 12-09-2002, 08:01 AM May be just install a normal 101 key, keyboard driver.
MasterBrian 12-09-2002, 08:13 AM Thank you very much Nozol, sorry for this problem :)
How I can check/change keyboard driver? (I'm not sure about this)
nozol 12-09-2002, 08:20 AM You are most welcome :)
Here is how to do it,
1- open /etc/sysconfig/keyboard
2- Make sure only the following is in it
KEYBOARDTYPE="pc"
KEYTABLE="us"
3- restart keytable
/etc/rc.d/init.d/keytable restart
That's it, wish you all the best!
MasterBrian 12-11-2002, 02:54 PM Thank you nozol, this solve my problem but I didn't use an US keyboard :|
BTW, thank you again ;)
|