Cannot open xwindows/xterm as a root


 
Thread Tools Search this Thread
Operating Systems AIX Cannot open xwindows/xterm as a root
# 8  
Old 01-29-2016
Quote:
Originally Posted by system.engineer
disabled the direct root login on all the AIX LPARs. So' only can become root by "su" to root from normal/regular user account.
This is a rather problematic setting. What are you going to do if something fails and you need to access the system via the console window from the HMC?

set "rlogin=false" but leave "login=true" for the root account! Everything else will get you into very deep kimchi once something fails. "rlogin=false login=true" means that root cannot log on from the network but can still log on from the console.

The reason why the root account has a different environment when you log in and when you sudo su - is most probably because sudo clears the environment before issuing su. The DISPLAY variable is set via the ssh because of the (implied or explicitly set) -X switch. You can write a little wrapper script to read that variable, store its value in a temp file and then retrieve it once you switched to root, setting it again to that value (similar to what agent.kgb suggested, but automated).

I hope this helps.

bakunin
# 9  
Old 01-29-2016
Thank you agent.kgb & Bakunin.

As you've mentioned,
we've already set "rlogin=false" & "login=true" for the root account! I understand that, root cannot log on from the network (ssh/telnet/etc) but can still log on from the HMC console.
we normally login with our USER accounts, and "su" to root (*provided we've the su capability & know root password)

So' I logged on to this particular test AIX LPAR using my "testaix" and were able to "su" to become root.
everything works as expected. If we need to login as root direcly, we normally use HMC console.


Issue is,

I can run xwindows using my user account "testaix" ; and I did su to root and not able to run xwindows as root.
I've tried agent.kgb's suggestion. It did not work for me.

Code:
[testaix@lpar]/home/testaix>echo $DISPLAY
localhost:10.0
[testaix@lpar]/home/testaix>su -
root's Password:
 
[root@lpar]/>echo $DISPLAY
displayed nothing

[root@lpar]/>export DISPLAY=localhost:10.0
 
[root@lpar]/>echo $DISPLAY
localhost:10.0
[root@dlpar]/>xclock
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: Authorisation not recognised

Error: Can't open display: localhost:10.0

FYI
just for testing, enabled direct root login from network (ssh). it worked.


But I was looking for a solution, without even enabling direct root login.

Thank you for your ideas/suggestions. appreciate your time.
# 10  
Old 01-29-2016
You did not say what X manager you were using
Code:
Xlib: connection to "localhost:10.0" refused by server
Xlib: PuTTY X11 proxy: Authorisation not recognised

to me is something is badly configured on the Xserver and as I see putty - I believe it on your PC... Have you enabled on Putty ( tick Enable X11 forwarding...) ?
I use reflection X and have no trouble.. even going through what is supposed to no work ( through PAM and bala...) only to get from the bastion machine to my server I have to use also
Code:
 ssh -X <severname>...

And using cmd.exe to typeipconfig on my PC to pick my current IP I have to enter

Sorry I am trying hard to correct what I type but I suffer from dislexia ... and some time its out of control...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

2. UNIX for Dummies Questions & Answers

xWindows error: xhost unable to open display

I am trying to direct a AIX display to my XWindows and I am at a dead end now! So this what I've done so far: 1. In putty settings, I set "Enable X11 forwarding" and also set "X diplay location" to "localhost:0" (without quotes, of course) 2. Via putty, connected to my AIX server 3. On... (1 Reply)
Discussion started by: shoefiend
1 Replies

3. Shell Programming and Scripting

How run simple command in xterm, and leave open?

I have written a simple script to show battery life remaining. I would like to be able to quickly view it with a predefined keybinding or launcher. xterm -e scriptname should do the trick but the xterm closes when the script finishes, not giving me chance to read the output. How can I keep... (3 Replies)
Discussion started by: spoovy
3 Replies

4. UNIX for Dummies Questions & Answers

Xwindows in unix

the question i have is why Xwindows(GUI) is not part of kernel level but part of user level in unix while in windows the GUI (Windows manager) it is part of kernel level. For one thing is when GUI hangs it does not crash the whole system as in Windows But windows avoids context... (0 Replies)
Discussion started by: sandesh.syr
0 Replies

5. UNIX and Linux Applications

How get root without local & with open port in server

hi all i have some question if any one can help me please How get root without local ? :( & How get root with open port in server use the telnet ? :( & How get root with Buffer Overflows ? :( please help me thanx to all (2 Replies)
Discussion started by: iis
2 Replies

6. UNIX Desktop Questions & Answers

Xwindows

i m working on a project of making linux boot and run from a pendrive. I have got a minimal root filesystem with busybox. I wish to install X Server now. I downloaded the source tar balls, untarred them on the host system, used the default host.def issued commands $make WORLDOPTS=-k World >&... (0 Replies)
Discussion started by: amu
0 Replies

7. Linux

Xwindows

i m working on a project of making linux boot and run from a pendrive. I have got a minimal root filesystem with busybox. I wish to install X Server now. I downloaded the source tar balls, untarred them on the host system, used the default host.def issued commands $make WORLDOPTS=-k World >&... (0 Replies)
Discussion started by: amu
0 Replies

8. SCO

I can't open a graphical session except for root

Hello , I've got a problem with my SCO 5.0.5 : When I try to open a graphical session with any user account (login/password) , I get a black screen then go back to the scosession window . For root account , there's no problem . Any idea ? Thanks . Regards (1 Reply)
Discussion started by: npn35
1 Replies

9. Linux

XWindows

I have written some Xwindows files would like to know how to compile them tried this command gcc -o main main.o -lXt -lX11 gives errors like could not find Xt & X11 help please (5 Replies)
Discussion started by: wojtyla
5 Replies

10. UNIX for Dummies Questions & Answers

XWindows Question

I have a pretty basic XWindows question. I'm using Linux and the BASH shell. I want to connect to a machine that is running a Java IDE (we currently have I think "SlickEdit" but we're probably going to download Netbeans, Eclipse) and view the IDE on the client machine. I tried "xhost +" on the... (5 Replies)
Discussion started by: doublek321
5 Replies
Login or Register to Ask a Question