Operating System - HP-UX
1832857 Members
3266 Online
110048 Solutions
New Discussion

Re: No-one but root can login into CDE

 
SOLVED
Go to solution
Naeem Ali
Advisor

No-one but root can login into CDE

hi,
I've been setting up a new system...
I updated 3 system files..
/etc/PATH
/etc/profile
/etc/skel/.login

Ther are NO errors in these files, howwever since changing these files, only root can log into the graphical environment.

When other users log into the command line enviroment , the PATH vairable is - /usr/bin:./
and there is another varible set as:

_=/usr/bin/env

I just can;t work out what on earth ahs happened and even when rolling back the changes non-root users still can't log in.
25 REPLIES 25
john korterman
Honored Contributor

Re: No-one but root can login into CDE

Hi,
any messages in /.dt/errorlog ?
do the non-root users get any error message on the screen?

regards,
John K.
it would be nice if you always got a second chance
Jannik
Honored Contributor

Re: No-one but root can login into CDE

the files above should have the following permissions:
-r--r--r-- 1 bin bin
jaton
Naeem Ali
Advisor

Re: No-one but root can login into CDE

the permissions were the first thing I checked out.

I am, however, getting the following message reported in $HOME/.dt/errorlog:

*** ERROR(4): dtsession (DATE & TIME>
Invalid display name - exiting.
*** [91]
john korterman
Honored Contributor

Re: No-one but root can login into CDE

Hi again,
when you set the DISPLAY variable, do you use an alias? Can this alias be resolved?

regards,
John K.
it would be nice if you always got a second chance
Naeem Ali
Advisor

Re: No-one but root can login into CDE

hmm.....
well, the DISPLAY variable isn't set anywhere for non-error users from what I can see...

Is it just me or is this too obvious to be the cause?
john korterman
Honored Contributor

Re: No-one but root can login into CDE

Hi again,
I do not see it either!
Last chance: did you update anything influencing the network, add a card or the like?

regards,
John K.
it would be nice if you always got a second chance
Elmar P. Kolkman
Honored Contributor

Re: No-one but root can login into CDE

You could try replacig dtsession by a script echoing the DISPLAY environment variable (this is what dtsession is complaining about in the errorlog) and the command line and then start the command line (the script would be (after moving dtsession to dtsession.old):
#! /bin/ksh
echo $DISPLAY
echo $0 $*
$0.old $*

This way you should at least see in the log files what the value is that is is complaining about.
Every problem has at least one solution. Only some solutions are harder to find.
Naeem Ali
Advisor

Re: No-one but root can login into CDE

additional info, just checked the sessionlog file as well, and as it going through each dtprocess, it reaches dt hello and reports:

/usr/dt/bin/dthello &
/usr/dt/bin/dthello: can't open display
Naeem Ali
Advisor

Re: No-one but root can login into CDE

right the out put from the script you suggested as a dtsession replacement was (in the startlog):

Not a terminal
stty: not a typewriter
stty: not a typewriter
Error: can't open display : :0
logout
Elmar P. Kolkman
Honored Contributor

Re: No-one but root can login into CDE

Ok. The users, are they logging in on the console or on a remote X-environment (xterminal or Reflection).
Every problem has at least one solution. Only some solutions are harder to find.
Naeem Ali
Advisor

Re: No-one but root can login into CDE

Th "users" have been set myslef and I am using these to login and debug the problem directly on the server. No remote login is currently possible.
Elmar P. Kolkman
Honored Contributor

Re: No-one but root can login into CDE

Is the DISPLAY environment variable the same for root as it is for normal users? It could very well be related to X-security...

Also try (re)moving $HOME/.dt so that the default is used to make sure that the problem is not in the sessions files for the normal users.

Hope this helps solving the problem...
Every problem has at least one solution. Only some solutions are harder to find.
john korterman
Honored Contributor

Re: No-one but root can login into CDE

Hi again,
is something being written to:
/var/dt/Xerrors
when you attempt to login. If so, do the last lines give a clue?

regards,
John K.
it would be nice if you always got a second chance
Naeem Ali
Advisor

Re: No-one but root can login into CDE

One of the things I've been ensuring throughout is that the DISPLAY variable is set correctly for boot root and the users.

I have even deleted a user and then re-inserted one and even then no log-in is possible.

i also attempted moving the .dt folder, again that did nothing to help matters along. i appreciate the help.
Naeem Ali
Advisor

Re: No-one but root can login into CDE

i have checked /var/dt/Xerrors and I get:

/usr/bin/X11/dthello & : unable to open display ':0'

mwm: could not open display

the host name is correct, the display variable is correct...and even after re-creating the user...still nothing
Elmar P. Kolkman
Honored Contributor

Re: No-one but root can login into CDE

You mentioned you change /etc/profile. This file is called for normal users even after re-creation. So probably the problem is located there. Could it be that you set your DISPLAY environment variable in that?
If so, try removing that setting and see if that solves your problem... because on a console you don't need to set the display variable to hostname:0 but can use things like localhost:0
Every problem has at least one solution. Only some solutions are harder to find.
Naeem Ali
Advisor

Re: No-one but root can login into CDE

I have rolled back the original /etc/profile and all other changes.

I have executed /usr/X11/bin/dthello from the command line and I get the same error -
'Can't open display'

Elmar P. Kolkman
Honored Contributor

Re: No-one but root can login into CDE

Try to do xhost on an working xterm or hpterm session. Make sure that the user and/or machine is in the list or that access control is disabled. If not, run xhost + to disable the access control for the current session and try the dthello again.

If this is not the cause of your problem, I'm out of options with the information you gave till now.
Every problem has at least one solution. Only some solutions are harder to find.
john korterman
Honored Contributor
Solution

Re: No-one but root can login into CDE

Hi,
it sounds as is the Xserver is not allowed to display on your screen, like if you have not run the "xhost +" command, but if there is no further hope, then try this command:
# /usr/contrib/bin/X11/dr_dt


which checks the CDE related setting.
Redirect the output to a file and look for ERRORS. You will get a lot of output which may hold a number of warnings that may not be the cause of your problem. If there are errors that would be the obvious thing to concentrate on first.

regards,
John K.
it would be nice if you always got a second chance
Naeem Ali
Advisor

Re: No-one but root can login into CDE

unfortunately, that did not rove fruitful either.

Many thanks for your help.

I know for sure (99%) that the current copy of /etc/profile is the original, however, is it possible to get another version that I could use?
Kelli Ward
Trusted Contributor

Re: No-one but root can login into CDE

Hi,

Please check the simple thing that got me once. Make sure /etc/hosts is world readable.

I.e.: -r--r--r-- bin bin /etc/hosts

Maybe it'll help. Good luck!

Kel
The more I learn, the more I realize how much more I have to learn. Isn't it GREAT!
Naeem Ali
Advisor

Re: No-one but root can login into CDE

oh..I have double-checked, triple-cheked
and now quadruple checked it :)
Naeem Ali
Advisor

Re: No-one but root can login into CDE

I have run /usr/contrib/bin/X11/dr_dt, fixed 2 errors, then rebooted the machine and still nothing I'm afraid.

Root still logs in fine, all other users can not.
Naeem Ali
Advisor

Re: No-one but root can login into CDE

Right - I have fixed this - thanks to the little tool /usr/contrib/bin/X11/dr_dt.

It din;t identify the exaact problem, but it gave me enough information to help me locate the problem.

The cause? Believe me when I say this, I did not do it. Another admin login ahd inadvertently chanegd the rights to /etc directory to r--r--r--.

Once they were changed back rwx-r-xr-x, all is fine and wonderful again.