1833780 Members
2488 Online
110063 Solutions
New Discussion

setting root

 
lawrenzo
Trusted Contributor

setting root

After installation I cannot figure out how to set home for root profile.

# cd $HOME
ksh: cd: bad directory.

can someone help or provide documentation for settting this up.

Thanks in advance
hello
10 REPLIES 10
Robert-Jan Goossens
Honored Contributor

Re: setting root

Hi Lawrenzo,

What did you set as roots home in the /etc/passwd file ? ("/" or /root)

Regards,
Robert-Jan
lawrenzo
Trusted Contributor

Re: setting root

default is set to /
hello
Robert-Jan Goossens
Honored Contributor

Re: setting root

how abot just

# cd

It should go to the home dir of root

Robert-Jan ( who by the likes a /root directory for home, think of a mistype between a copy from two servers you wont get the mes al over you system.

Regards and good night.

Robert-Jan
Bill Hassell
Honored Contributor

Re: setting root

$HOME is automatically provided by the shell when you login. What does:

echo $HOME

report? If there is nothing reported or you get an error message that "HOME: Parameter not set." then there is something very strange about your login method. Are you using Xwindows? Are you using ssh? Have you changed /etc/profile? What does:

echo $SHELL

report? If it is not /sbin/sh, you must immediately change root's shell back to /sbin/sh as your system will malfunction in single user mode with a different shell.


Bill Hassell, sysadmin
lawrenzo
Trusted Contributor

Re: setting root

ok,

ehco $SHELL displays a valid shell;

echo $SHELL displays nothing ie

# echo $SHELL

#

we have created a test lab from a version of hpux 11.00 seot 04. Both servers have this problem so do you think it is something missing from our configuration procedures?

how can I fix this.

Thanks
hello
Bill Hassell
Honored Contributor

Re: setting root

Type the commands:

set
ps -f

This will list the current environment.

You need to provide more information about your computer. Is it a workstation with a graphics display? If not, are you logging in using the system console, or using telnet, or what?


Bill Hassell, sysadmin
lawrenzo
Trusted Contributor

Re: setting root

server is an N_class we use hummingbird exceed from windows - this works fine with all other servers on our network
hello
Bill Hassell
Honored Contributor

Re: setting root

The Hummingbird product is an Xwindows emulator. In HP-UX, when you startup a terminal window using Xwindows, the normal environment is missing. This is a feature of the CDE Xwindows environment and the terminal emulators, xterm, hpterm and dtterm. To get a 'normal' Unix login, you can use a command window (DOS) on your PC and type: telnet When you login this way, you get a 'normal' Unix environment.

What you are doing is starting CDE on the HP-UX computer and having it take over your PC's screen. Then you click on a terminal window and you'll notice that it starts instantly with no meaningful environment (that is, /etc/profile and .profile are not run) To fix the problem using Xwindows (Hummingbird), run this command one time for each user that logs in to your N4000:

echo "*loginShell: true" >> .Xdefaults

Do this as soon as each user logs in so the file .Xdefaults will be in the home directory. Then logout and restart Hummingbird and now when you login, you'll see the normal Unix startup messages along with a full environment (use the set command to see the difference).

Now if your system administrator knows a bit about scripting, a script can be written to create this file in all user home directories.


Bill Hassell, sysadmin
lawrenzo
Trusted Contributor

Re: setting root

I am not convinced as the two crash and burn servers which we have installed have both the same issue and all other servers configured on our network and that we coonect via exceed display / when you type echo $HOME

hello
Bill Hassell
Honored Contributor

Re: setting root

Try telnet (from a local DOS window) to all of the servers and echo $HOME


Bill Hassell, sysadmin