Operating System - HP-UX
1832681 Members
2784 Online
110043 Solutions
New Discussion

root can't login remotely

 
Crystal_1
Frequent Advisor

root can't login remotely

Hi,

I don't have /etc/securetty file on my system. However, I can't use root to directly login remotely, but su.

You know why?

Thanks
Crystal
8 REPLIES 8
Pete Randall
Outstanding Contributor

Re: root can't login remotely

Hi Crystal,

Nothing comes to mind. Do you get an error message?


Pete

Pete
Rita C Workman
Honored Contributor

Re: root can't login remotely

Do you have an .rhost file set up on that remote system to allow you to remotely connect to as root?

Rgrds,
Rita

Crystal_1
Frequent Advisor

Re: root can't login remotely

login incorrect.
Crystal_1
Frequent Advisor

Re: root can't login remotely

It's really wired....I created new /etc/securetty and deleted it, then works.

Thanks anyways....

Crystal
Jairo Campana
Trusted Contributor

Re: root can't login remotely

Hi,
You should also look at the /var/adm/inetd.sec file which is an access control file for indernet daemons like
login, telnet, ftp, shell, rcp etc..
You should conside that as to whom to give access to.
.
legionx
Donny Jekels
Respected Contributor

Re: root can't login remotely

check your systems /etc/profile

and look for an if statement that will kick root out if it comes in other than console.

this is what I use.

if [ `whoami` = root -a `tty` ! "/dev/console" ]
then
echo "Error: root logins are only allowed on the console. "
exit 1
fi

other than this there should'nt be anything to prevent you from login in also check /etc/default
"Vision, is the art of seeing the invisible"
Donny Jekels
Respected Contributor

Re: root can't login remotely

Crystal,

sorry, /etc/default is only on Sun ;-)

but my best bet right now is check your /etc/profile.

use tis file wisely and you can control all your users, try using function inside this file for different users.

stick this function in at the bottom of this file and see what happens.

greet()
{
set -- $(who -Rm)
Machine=${6#\(}
Machine=${Machine%\)}
nslookup $Machine | strings | tail -n 1 | cut -f2 -d":" | read IP
NAME=$(whoami)
grep ${NAME} /etc/passwd|awk -F: '{print $5}'|awk '{print $1}'|read Name
HOUR=$(date +%H)
if [ $HOUR -le 12 ] && [ $HOUR -ge 0 ]
then
greet=Morning
elif [ $HOUR -gt 12 ] && [ $HOUR -le 18 ]
then
greet=Afternoon
else
greet=Evening
fi
if [ -f /usr/bin/mail ]
then
if mail -e
then
ifmail=$(echo "You've got mail, please check it.")
else
ifmail=$(echo "You don't have mail at this time.")
fi
fi
printf "\n\tGood $greet, $Name, $ifmail\n\n\n"
printf "\tYour PC's IP address is: $IP\n\n"
printf "\tYour PC's name is: $Machine\n\n"
printf "\tToday is: `date +%A`\n\n"
printf "\tDate is: `date +%D`\n\n"
}
greet




peace to the world
Donny
"Vision, is the art of seeing the invisible"
Tim D Fulford
Honored Contributor

Re: root can't login remotely

This may be way off track... But when you login remotely is the terminal set up in the profile correctly?

I had problems once when using meta characters in the root password (actually "-"), some terminal settings swapped them round, hence "login incorrect" was shown. I simply changed the root password for this, but I could have equally have corrected the root cause!

Tim

-