Server does not start properly on Jessie

Forum / NoMachine for Linux / Server does not start properly on Jessie

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #9328
    yakmo
    Participant

    Hi

    I installed NX using the deb file. It works great as a client but it seems like I am not able to start the server, so it stays offline(stopped).

    /etc/NX/nxserver –restart
    NX> 162 Disabled service: nxserver.
    NX> 162 Disabled service: nxnode.
    NX> 162 Disabled service: nxd.

    Here is some log tail

    https://paste.debian.net/343933/

    #9375
    Cato
    Participant

    Hello yakmo,

    Logs suggest that failure during session opening in pam_mount occurs. We’re currently investigating this issue. To possibly allow you to use NoMachine server, you can try to disable pam_mount in your pam configuration. These are the instructions:

    Create backup of ‘/etc/pam.d/nx’ file and edit it’s content. Replace possible ‘include’ directive in session stack with explicit modules list. E.g. let’s assume this is content of your nx pam configuration:

    auth         include       su
    account    include       su
    password  include       su
    session      include       su

    ‘Include’ between ‘session’ and ‘su’ means that list of pam modules for session stack is imported from ‘/etc/pam.d/su’ file. It is possible that it contains ‘include’ too, in such case we need to follow them too until we find all pam modules names loaded during nx session startup. When you have such list in ‘/etc/pam.d/nx’ file, simply remove pam_mount entry.

    #9374
    yakmo
    Participant

    Hi

    Any recommendations on how to fix this issue?

    thanks

     

     

     

     

    #9376
    bakhtadze
    Participant

    Hello yakmo,

    There is a second solution too.

    You can follow all steps that where described in previous post. But instead of removing pam_mount entry you can add disable_interactive option next to pam_mount.so.

    It should be like:

    session optional pam_mount.so disable_interactive

    #9380
    yakmo
    Participant

    Hi FooBar

    Thanks for detailed explanation but unfortunately I am completely loss because I have no idea how this pam stuff works.

    Can you please tell me exact steps to disable this stuff? For instance where do I remove “pam_mount” from? Also I have no idea what those “explicit modules  list”.

    You did a great job of explaining but it does not help me in this case due to lack of my expertise in that area.

    thanks

     

    #9397
    yakmo
    Participant

    Thanks for the answer but I am so lost. Can you please tell me the “names” of the files to edit. I cant find what you guys are talking about. I look around in /etc/pam.d and do not know what file to edit

    #9401
    yakmo
    Participant

    Can someone please help me out this in super simple terms with which file to edit? It is all convoluted and wasting too much time on this ;(

    I just need to know which file to edit. I cant find any of the entries mentioned here.

    #9410
    Cato
    Participant

    Hi yakmo,

    Check out this article about how Pluggable Authentication Modules (PAM) work:
    http://www.tuxradar.com/content/how-pam-works.

    These are step by step instructions of how to disable pam_mount for NX protocol. Module and file names used in this instruction are just an example, and might be different in your configuration.

    Open ‘/etc/pam.d/nx’ file. Look for lines containing ‘session’ word.
    This is default content of ‘/etc/pam.d/nx’ file:

    auth       include       su
    account    include       su
    password   include       su
    session    include       su

    ‘session include su’ means that modules list for session stack resides in ‘/etc/pam.d/su’ file. So let’s check content of ‘/etc/pam.d/su’. This is the interesting part of file:

    session    optional   pam_mail.so nopen
    session    required   pam_limits.so

    @include common-auth
    @include common-account
    @include common-session

    There are two pam modules listed here, and include directives pointing at common-auth, common-account and common-session files. Syntax is different here, it means that whole files are included instead of just session stack. Putting this all together, list of modules of session stack for NX protocol consists of pam_mail, pam_limits and all modules for session stack listed in common-auth, common-account and common-session. So we can replace

    ‘session include su’ in ‘/etc/pamd/nx’ file with:

    session  optional  pam_mail.so   nopen
    session  required  pam_limits.so

    This is the first part of explicit list of session modules. The rest is still in common-auth, common-account and common-session files. We need to inspect them in the same way we checked ‘su’ file and copy lines with session modules to ‘/etc/pam.d/nx’, so it can resemble this:

    auth    include       su
    account include       su
    session optional      pam_mail.so   nopen
    session required      pam_limits.so
    session [default=1]   pam_permit.so
    session required      pam_mount.so
    session requisite     pam_deny.so

    Now you can remove the ‘session required pam_mount.so’ line or, following bakhtadze’s advice, modify it to:
    ‘session optional pam_mount.so disable_interactive’.

    • This reply was modified 9 years ago by Cato.
    #9419
    yakmo
    Participant

    Hi

    I think that I got it fixed. This is how my nx looks like now

    # This is a default PAM configuration for NoMachine. It is based on
    2 # system’s ‘su’ configuration and can be adjusted freely according
    3 # to administrative needs on the system.
    4
    5 auth    include       su
    6 account include       su
    7 session optional      pam_mail.so   nopen
    8 session required      pam_limits.so
    9 session [default=1]   pam_permit.so
    10 session optional pam_mount.so disable_interactive
    11 session requisite     pam_deny.so

    But now I have a different issue. The client says it cant find a desktop. I am opening a new question for it.

     

Viewing 9 posts - 1 through 9 (of 9 total)

This topic was marked as solved, you can't post.