Re: login: ROOT LOGIN ttyp0 from xxx
From: Anthony Mandic (af_at_hotmail.com)
Date: 08/29/03
- Next message: Dr. David Kirkby: "Re: Why does this not run from /etc/inittab ??"
- Previous message: cljlk: "Re: login: ROOT LOGIN ttyp0 from xxx"
- In reply to: cljlk: "Re: login: ROOT LOGIN ttyp0 from xxx"
- Next in thread: Rich Teer: "Re: login: ROOT LOGIN ttyp0 from xxx"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 29 Aug 2003 04:03:51 GMT
In comp.unix.solaris cljlk <cljlk@hotmail.com> wrote:
> SunOS does not has /etc/default/login file, the /etc/default/login only
> exists in Solaris.
DOH!!! It's not SPOCK'S BRAIN's fault, I didn't notice the
4.1.4 part to tell him.
Tony Walton wants to know why you are running 4.1.4.
>
> I need to let user login as root, and the message sould to to consol window.
Okay, I don't remember if there's a system way to do it.
Ogg died and willed me no manuals.
Also, you have stated BOTH
a) I don't want to allow direct remote root login
b) I need to allow direct remote root login
If you want #a:
Here's a script way to do it. IIRC, I was never able to
CTL/C out of it to a shell at the right time to get a
root prompt. Try it yourself.
Assuming you're running a Bourne shell, edit this into
the top of /etc/profile:
trap "trap '' 0 1 2 3;exit 1" 0 1 2 3
uid=`id|sed 's/(.*//'`
if [ "$uid" = "uid=0" -a `tty` != "/dev/console" ]
then
echo "Root logins are only permitted on the console"
exit
fi
unset uid
When you need to su to root, use "su" instead of "su -".
And check/test/hack with /etc/syslog.conf to get the
logging you want.
-am © 2003
- Next message: Dr. David Kirkby: "Re: Why does this not run from /etc/inittab ??"
- Previous message: cljlk: "Re: login: ROOT LOGIN ttyp0 from xxx"
- In reply to: cljlk: "Re: login: ROOT LOGIN ttyp0 from xxx"
- Next in thread: Rich Teer: "Re: login: ROOT LOGIN ttyp0 from xxx"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|