su to root

Hi,

We have a HP-UX 11.11 production system. Right now the way it is set up that you can directly login to server as root. But, we want to change the setup. like every user should login with his/her userid and then su to root.

Is it possible? How it can be acheived.

Regards,
Inder

This is mentioned in "man login". Basicly just put "console" in /etc/securetty. Then except for /dev/console, root cannot login.

Hi,

Thanks for your prompty reply.

I checked for securetty file under /etc. I don't have any. So I just created a new file named securetty under /etc/ and added console in that. Now I cannot login directly as root. But I can do su - to root which is what I wanted.

Following are the contents of my /etc/securetty file:

console

I just wanted to make sure with you that I did the right thing and I can still login directly from console.

And in your post you mentioned about excluding the /dev/console . How I can do that.

This is mentioned in "man login". Basicly just put "console" in /etc/securetty. Then except for /dev/console, root cannot login.

TIA,
Inder

Inder,
/dev/console mentioned above refers to the physical console device (hp terminal, web console, etc...) attached to your servers console port.

If you have one, you will find that you can access your system from the login prompt as root.

hope this helps,
manny

Hi Manny,

Thanks for the reply.

Right now we don't have any physical device attached to console port.

My understanding is if we try to connect from console, we should be able to do this.

Please confirm.

Regards,
Inder

You are correct Sir!
Once you connect an hp supported device into your servers console port (remote console port may also work), you will be able to log into your servers as "root".

make sure your file permissions are set:
# ll /etc/securetty
-rw------- 1 root sys 8 Dec 14 2002 /etc/securetty
# cat /etc/securetty
console

Thanks a ton!!!

-Inder