Solved

How to enable Login as Root via NX?

Posted on 2007-12-04
9
14,629 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Linux Filesystems reporting faster growth than actual file growth... 7 23
Sendmail STARTTLS error 37 84
Linux  Script File Attributes 5 53
Linux VM 6 54
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Secure Shell (SSH) is a network protocol for secure data communication, mainly used to administer remote Unix / Linux servers via command line. But it also allows the user to open a secure tunnel between a client and a server where he can send any k…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

863 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

27 Experts available now in Live!

Get 1:1 Help Now