su to root | Unix Linux Forums | HP-UX

  Go Back    


HP-UX HP-UX (Hewlett Packard UniX) is Hewlett-Packard's proprietary implementation of the Unix operating system, based on System V.

su to root

HP-UX


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-11-2006
isingh786 isingh786 is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 24 January 2008, 9:50 AM EST
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #2  
Old 01-11-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon (Administrator Emeritus)
 
Join Date: Aug 2001
Last Activity: 18 April 2014, 1:11 PM EDT
Location: Ashburn, Virginia
Posts: 9,833
Thanks: 42
Thanked 378 Times in 225 Posts
This is mentioned in "man login". Basicly just put "console" in /etc/securetty. Then except for /dev/console, root cannot login.
Sponsored Links
    #3  
Old 01-12-2006
isingh786 isingh786 is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 24 January 2008, 9:50 AM EST
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
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
    #4  
Old 01-12-2006
mr_manny mr_manny is offline
Registered User
 
Join Date: Oct 2005
Last Activity: 15 November 2013, 4:46 PM EST
Posts: 154
Thanks: 1
Thanked 2 Times in 2 Posts
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
Sponsored Links
    #5  
Old 01-12-2006
isingh786 isingh786 is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 24 January 2008, 9:50 AM EST
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
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
Sponsored Links
    #6  
Old 01-12-2006
mr_manny mr_manny is offline
Registered User
 
Join Date: Oct 2005
Last Activity: 15 November 2013, 4:46 PM EST
Posts: 154
Thanks: 1
Thanked 2 Times in 2 Posts
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
Sponsored Links
    #7  
Old 01-12-2006
isingh786 isingh786 is offline
Registered User
 
Join Date: Aug 2005
Last Activity: 24 January 2008, 9:50 AM EST
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks a ton!!!

-Inder
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Lost Root Password on VXVM Encapsulated Root Disk sunnyd76 Solaris 1 03-09-2012 09:16 PM
what kind of right is needed for a non-root use to modify the root passwd sleepy_11 Solaris 3 07-28-2009 01:16 PM
Can't login root account due to can't find root shell neikel AIX 2 01-30-2008 10:07 PM
how to access root priveliges if root password is lost wojtyla Linux 1 02-18-2005 05:24 AM
Run non-root script as root with non-root environment bubba112557 UNIX for Dummies Questions & Answers 2 12-02-2004 11:39 PM



All times are GMT -4. The time now is 02:14 PM.