Discussion Locked

Sol 2.6, CDE, su to root and how to disp

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I manage webservers on Sun/Solaris 2.6. I've never had to configure .cshrc or .login for "users" outside of myself. I use vi.

I have 2 webdesigners who need to be able to su to root, but when they do that, they can't use the filemanager or the dtpad at the bottom of the CDE screen. I'm not worried about them using root -- they're scared to use it and have very few things they'll do before they exit out of it.

It's a regular 2.6 install, but it is tightened for security, lacking some of the /etc/inetd.conf daemons. There is no xhost "server" or ttdb "server" (whatever those are!)

They use tcsh, which reads the .cshrc in their home directory.

The current .cshrc contains these, that might make a difference:
setenv PATH /usr/sbin:/usr/bin:/usr/local/sbin:/
usr/local/bin:/opt/GCC281/bin
setenv MOZILLA_HOME /usr/local/netscape
setenv LD_LIBRARY_PATH /usr/local/lib:/usr/lib:/
usr/openwin/lib:/usr/dt/lib:/usr/ucblib

I change the display, and I've changed the editor, and I've tried xhost and I've tried Solstice!

1. setenv DISPLAY hostname:0.0 (works, same result with IP)
set EDITOR /usr/dt/bin/dtpad (works)

Try launching editor:
/usr/dt/bin/dtpad
(Error!!)
Xlib: connection to "hostname:0.0"
refused by server
Xlib: Invalid MIT-MAGIC-COOKIE-1 key
Error: Can't open display: hostname:0.0

Try doing the xhost command:
/usropenwin/bin/xhost +hostname
(Error!! Same as above)

Try the Solstice command:
solstice
(Error!! Same as above)

What am I missing here??? Libs? I configuration file? It's gotta be something simple because I can't find it documented anywhere -- but I've never had to configure servers for users to use.....

2. What command does the user use to launch filmanager or the dtpad once they have su'd to root??

THANKS!!!!

7 replies

by cavedweller

Try doing the xhost command before the su. This way the logged in user is granting permissions, not root trying to take them. Adding /usr/dt/bin to the path will make things easier. Remember that CDE runs with the environment it was launched with. Typing commands in a window later won't change CDE's environment.

Usually, I start up CDE as myself, then su in a dtterm and launch apps as root from there. This works for admintool and solstice as well as the normal CDE apps.

by insatiable

Thanks for the help. Doing xhost before the su is definately the trick! I still have problems however, and I'll be posting a NEW question if you're interested. :-)

by dabutler

Two ways to solve this - one is as the other user mentioned
Step one: Log in
Step 2: xhost + (there is a man on xhost)
Step 3: su - root
Note that when you use the - "dash" in the su - it reads the startup scripts for root. Soooo - you must setyour display
DISPLAY=host:0.0
export DISPLAY or.....
csh
setenv DISPLAY host:0.0

run your gui.

Now, you ask what is ttdb - that is tooltalk, and that is what CDE uses to communicate.

Since it sounds like your users have the gui running (CDE desktop) all should work. If you do not have X running, then you might want to look in /etc/rc3.d and start the gui.
Merry Christmas

by insatiable

I really appreciate your help also! It makes a big difference when I do the xhost command before the su - to root. I'm posting a new question with the new problem now, if you care to look it up. Thanks!

by jay allen

The only you are missing is the export command. Anytime you su to someone, you run a new shell and environment. Good Luck!!

by insatiable

Sorry. The export command wasn't missing because I was using a different shell. The setenv command isn't exported. Thanks for reading though -- I'm putting a new question up with the update of where I am with this problem if you're interested in looking it up.

This discussion is closed to new replies.