Custom commands

Forum / General Discussions / Custom commands

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11831
    kgrzeska
    Participant

    Hallo,

    I would like to know, if there is a way to restrict custom commands at server side for a custom session?

    Like users may only execute firefox in custom sessions.

    My first attempt would be to create a script and start it through server.cfg as UserScriptBeforeSessionStart and check the custom command.

    But I didn’t find the custom command in any nxserver/client log file.

    Is there a way to get the custom command at server side, before execution?

     

    Best regards

    Konrad

     

    #11848
    Gega
    Participant

    Hello kgrzeska,

    Custom commands are not sent to custom scripts, so there is no way to control allowed commands from custom scripts, there is other way to control allowed commands. Our products: NoMachine Terminal Server, NoMachine Enterprise Server and NoMachine Cloud Server support profiles feature. Profiles can be used to define allowed command. The general format of the command is:

    nxserver --ruleadd --class session --type unix-script --value value OPTIONS

    value must be path to allowed command, e.g. /usr/bin/firefox.

    OPTION can be any of the following options:

    --system

    set the rule on a per-server basis. The rule will be applied to the whole NX System and to every user accessing it

    --user USERNAME

    set the rule on a per-user basis. The rule will be applied to the specified user only

    --guest

    the rule will be applied to all guest users and will not affect other users. Guest accounts are available only on Linux.

    --node NODE

    set the rule for the specified NODE only

    --group GROUP

    set the rule for the specified GROUP.

     

    Here are some examples how to set allowed commands using profiles:

    This command will set firefox as allowed command for user: adam :

    
    nxserver --ruleadd --class session --type unix-script --value /usr/bin/firefox --user adam

     

    This command will set firefox as allowed command for group: adam :

    nxserver --ruleadd --class session --type unix-script --value /usr/bin/firefox --group adam

     

    This command will set firefox as allowed command for everyone:

    nxserver --ruleadd --class session --type unix-script --value /usr/bin/firefox --system

     

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

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