Solved

How to enable Login as Root via NX?

Posted on 2007-12-04
9
14,607 Views
Last Modified: 2013-12-16
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?
0
Comment
Question by:shofarslee
9 Comments
 
LVL 13

Expert Comment

by:WizRd-Linux
ID: 20417658
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??
0
 

Author Comment

by:shofarslee
ID: 20420085
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



0
 

Expert Comment

by:pillaisuder
ID: 20427583
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
0
 

Author Comment

by:shofarslee
ID: 20429591
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"
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Accepted Solution

by:
shofarslee earned 0 total points
ID: 20485285
I heard from NX that this feature is totally disabled in their current version of the product, but they will look into adding this feature back in the future.
0
 
LVL 13

Expert Comment

by:WizRd-Linux
ID: 20488060
In this instance I agree with the refund as it is not possible to resolve the issue.
0
 
LVL 1

Expert Comment

by:modus_operandi
ID: 20513046
Closed, 500 points refunded.
modus_operandi
EE Moderator
0
 
LVL 2

Expert Comment

by:peterlambrechtsen
ID: 21595222
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.
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
We all know how boring and exhausting it is to transfer huge web projects developed locally to a webserver simply via FTP. The File Transfer Protocol is a really nice solution if you need to transfer small amounts of files, but if you're plannin…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Viewers will learn how to properly install and use Secure Shell (SSH) to work on projects or homework remotely. Download Secure Shell: Follow basic installation instructions: Open Secure Shell and use "Quick Connect" to enter credentials includi…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now