Link to home
Start Free TrialLog in
Avatar of shofarslee
shofarslee

asked on

How to enable Login as Root via NX?

I have a RHEL 4.6 rack mount server running NX Server 3. I am using this for some testing purposes, but I don't want to sit in the server room. I'd like to sit at my desk and remotely work on the server.

I have installed the free version of NX Server (with Client and Node)  from NoMachine. I can make a connection as a non-root user, but I cannot do this as root. (I know - this is a very big security hole, and I can sudo or su once I've made the connectionas a non-root user etc. - but I am doing this for some temporary testing and simply don't want to sit in the server room at the console to do this, and I don't want to enter the root password every time I launch something in the GUI.)

I can ssh to the server as root, but when I try to log in as root via the NX client, I get the message: "User root' cannot be used as an NX user."

My installation of  NX Server had no customizations - just the generic default install other than generating new DSA keys.

How can I enable logging in as root via the NX Client?
Avatar of WizRd-Linux
WizRd-Linux
Flag of Australia image

check /etc/ssh/sshd_config and check the setting PermitRootLogins, if it is set to no or undefined it will deny root logins.

I haven't personally used NX before, but it may be a restriction in the client??
Avatar of shofarslee
shofarslee

ASKER

I believe the problem is with the NX Server configuration, not with ssh or with the NX client.

Here's why:

1) I can make an ssh connection to the server as root. (PermitRootLogins is already set to "yes", by the way.)

2) Using the same NX Client, I can make a connection to another server, logging in as root. That other server is running NX Server version 2. The server on which I want to log in as root is running NX Server version 3.

Unless someone knows for sure that logging in as root is absolutely disabled in version 3 of NX Server, I'm hoping there must be some simple configuration change to enable this.

Thanks



1.check /etc/ssh/sshd_config  fileand check the parameter
PermitRootLogins if it is set to no or not specified set as yes
2.edit /etc/pam.d/remote
and diable the line       account    required     pam_nologin.so
and try to telnet as root from another machine
and tell me the result
The /etc/ssh/sshd_config file of the remote server (Let's refer to this server as "RemoteServer1") has the following line:
PermitRootLogin Yes

(In other words, PermitRootLogin is explicitly enabled for ssh.)

At a terminal command prompt on my local workstation, I can successfully log in as root to "RemoteServer1" using ssh (using: ssh root@RemoteServer1). NX uses ssh tunnelling for authentication and link parameter negotiation.

There was no "account      required      pam_nologin.so" line in the /etc/pam.d/remote file. There was an "account     required     pam_stack.so service=system-auth" line, but not knowing what this does, I didn't want to delete it.

Other info:
1) Using the NX Client on my local system, I can log in as root and open up an NX session to a different server. (Let's call this one "OldRemoteServer2".)

2) Using the same NX Client, I cannot log in as root to "RemoteServer1" via NX.

3) NX uses ssh. Since #1 shows that the NX Client is capable of making a connection as root (to "OldRemoteServer2"), I assume the reason for #2 is a configuration problem with NX Server on "RemoteServer1"
ASKER CERTIFIED SOLUTION
Avatar of shofarslee
shofarslee

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
In this instance I agree with the refund as it is not possible to resolve the issue.
Avatar of modus_operandi
Closed, 500 points refunded.
modus_operandi
EE Moderator
I have found a work-around to this issue.

On Suse Linux Server if you configure your desktop to be "Unix" and the Display Manager to be "XDM" instead of Gnome or KDE, then when you connect to your NX server using a valid username & password (that isn't root) you are presented with a regular login screen that you CAN login with your root username and password.

You can then leave this session up, and disconnect from it etc.