Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 649
  • Last Modified:

console ownership

Hi,
   I am running RedHat 9.0 on an Intel Pentium 4.  When I log in as Odin (a user account) I have no trouble starting the X Windows environment w/ 'startx'.  However, when I log in as Root the screen blanks, the mouse X appears and that is all that happens.  ie. X Windows does not appear. (the mouse is active).  When instead I switch from Root to Odin as 'su - odin', then I get the Fatal server error: 'PAM authentication failed, cannot start X server.'  Moreover, it could not find 'xinit' which may be the problem.  When I am Odin and 'which xinit' I get /usr/bin/X11/xinit, when I am Root and 'which xinit' I get /usr/X11R6/bin/xinit.

    I have tried in Odin export DISPLAY=:0.0, but when I try 'xhost +' I get
        'xhost: unable to open display ":0.0"
I would like to know why I cannot startx from Odin when I su from Root.  Pls advise.  Thx.
0
akaodin
Asked:
akaodin
  • 4
  • 3
  • 2
  • +1
1 Solution
 
gheistCommented:
" RedHat 9.0 on an Intel Pentium 4"

Is it supported ???
RH 9 is old try Fedora Core 3
0
 
wesly_chenCommented:
> " RedHat 9.0 on an Intel Pentium 4"
Yes, RedHat 9 can run on P4 without problem.

This is the issue of tty.
When you login as root, say you use tty1 (who -m). Then you "su - odin", and do "who -m".
You will see "root" on tty1 even though "whoami" tell you that you are "odin".

So startx use the tty while you login (as root) and find out you have no permission to change the file in
~root/.Xauthority when you "su - odin".

The easy way is change /etc/inittab from
id:3:initdefault:
to
id:5:initdefault:
And reboot.

So it will boot as graphic mode without typing "startx".

Regards,

Wesly
0
 
akaodinAuthor Commented:
Hi,
   Actually, I would like to set up one user account which automatically boots into Xwindows, but lets all other accounts boot into command prompt.  I did try changing the permissions on /root/.Xauthority from RW------- to RWXRWXRWX.  Still got the PAM authorization error.  When I login to the odin account I want to begin as command prompt. Any other suggestions.  Thx.
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
gheistCommented:
You should use display manager and make it log you in. Too much permissions can be of problem too.
0
 
wesly_chenCommented:
> I would like to set up one user account which automatically boots into Xwindows, but lets all other accounts boot into command prompt.

    Say that user account called "u1", who will boot into Xwindow. Assume the default shell for that user is sh or bash.

    Edit /etc/profile  (assume the account default shell is bash/sh shell) and add
---
USER="`id -un`"
# check login username #
CURRENT_DATE=`date +%Y%m%d`
if [ $USER = "u1" ]   ## the account1 may vary
then
   startx
fi
....
-------

So, the default runlevel is 3 and the user "u1" login in will run "startx" immediately.

> /root/.Xauthority from RW
If you login as odin and "su - " to root, then root has no problem to run "startx" since root account can bypass all the authentication
limitation. tty is hard to manuplate as regular user.

Wesly
0
 
akaodinAuthor Commented:
Hi,
  Not really:
If you login as odin and "su - " to root, then root has no problem to run "startx" since root account can bypass all the authentication
limitation. tty is hard to manuplate as regular user.

When I try it my system hangs w/ a blank screen and the mouse X in the middle.  It's not a bad hang because I can Ctrl-Alt_Backspace and return.  Yet the log file doesn't show any errors.

When I log in as root and su - odin, then I get a PAM authentication failure.  I am sure there is something wrong somewhere, but I know not what it is.  Pls advise.  Thx.

By the way Wesly, your trick w/ the startx in the /etc/profile did work.  Thx.
0
 
wesly_chenCommented:
> When I try it my system hangs w/ a blank screen and the mouse X in the middle.
I tested with my system and the startx worked for "su -".

Besides, "su -" is not hang with PAM authenication failure on your case, either.

tty is the key role for graphic display on Xwinidow.
I don't know how to work around on it.

Wesly
0
 
gheistCommented:
But does it hang on second time when you startx as odin ???
0
 
wesly_chenCommented:
Please reset the point to 0 and don't delete the question.
There are some good information provided by experts.
0
 
DarthModCommented:
PAQed with no points refunded (of 250)

DarthMod
Community Support Moderator
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
  • 2
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now