SystemLink Forum

cancel
Showing results for 
Search instead for 
Did you mean: 

Target User Management Feature and other features of target web portal

Solved!
Go to solution

When will SystemLink have the ability to manage user accounts on the target? Ex: cRIO-904x I want to add a non-admin user with a unique password so that I can give some limited control to my customers. Right now the only way to do that is through the web interface. And of course, the web management package for Linux RT is not yet available for install from the SystemLink package feed. The only way to install it is from MAX, which basically means I have to use MAX to install all the SW if I want access to the web management. 

 

Is the web management package going to be added to the SystemLink feed?

 

Another useful feature of the target web portal not yet replicated anywhere is the remote file browser. Will that be added to SystemLink?

0 Kudos
Message 1 of 11
(5,044 Views)
Solution
Accepted by topic author wrkcrw00

You can create users and specify passwords using SystemLink States.  Attached is a state that creates a user fred with the password foo.  You can unzip it and upload the SLS file using the States tab in Systems Manager, edit the user and password, and then apply it using the Software button.  You can also hash the password if you don't want it to be in clear text in the state. For more information check out https://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html

 

Also, SystemLink's job system has the ability to create, add, remove, read and write files. I'll add an item to backlog to create something like a file browser, but if you can give me a little more detail on what you would like to do specifically, I may be able to create a State or WebVI that you could use in the mean time.

 

For more information check out https://docs.saltstack.com/en/latest/ref/modules/all/salt.modules.file.html and https://docs.saltstack.com/en/latest/ref/states/all/salt.states.file.html

 

As an example, I created the following state to change the master (server) configuration file and reboot my systems.

https://github.com/joshuaprewitt/systemlink-state-examples/blob/master/Change%20Master.sls

 

And another example on changing INI configuration files.

https://github.com/joshuaprewitt/systemlink-state-examples/blob/master/Configure%20INI%20Setting.sls

Message 2 of 11
(4,973 Views)

Thanks Joshua, this is very interesting material.

It would be nice if the SL manual would at least reference these possibilities.

Regards,
André (CLA, CLED)
0 Kudos
Message 3 of 11
(4,956 Views)

I didn't know System States could be used in that way. Good to know. I'll give these a try.

 

For the file browser, I want a way to view config files that are on the target. Additionally, I want to create a process that allows me to push configuration controlled config files from my SCC system, through SL, to the target.

 

Another ask is for the ability to assign individual users or groups to specific systems. For instance, this would allow me to control which of my users can push config files to a specific set of targets, or allow the owner of a system to restart that system without giving that person access to all systems (I only want me team to have full access to all systems). 

0 Kudos
Message 4 of 11
(4,940 Views)

If you have a git based source code control system you can create a state like the following to sync files from a git repository to a path on the target.  Note the following only seems to work on x64 Linux RT targets, since it doesn't seem that git is available as a package for the ARM targets.

 

https://github.com/joshuaprewitt/systemlink-state-examples/blob/master/Git%20RT%20example.sls

 

For more information on additional git options in states see the following.

https://docs.saltstack.com/en/latest/ref/states/all/salt.states.git.html

 

As for the more granular user access to specific systems we are working on it and hope that have more options available in 2020.

 
 
 
Message 5 of 11
(4,929 Views)

Also, here is a link to a simple WebVI application that uses the SL jobs to read the contents of a file from an RT target. This application requires that you are using SystemLink Server 19.5 or higher.

 

https://github.com/joshuaprewitt/systemlink-file-browser

 

In order to run the application, you will need to ensure your SystemLink Web Server has CORS enabled and you will need to specify the url, username, and password in the WebVI to run it from NXG. If you decide to deploy and host the WebVI as an application on your server you should leave the url, username, and password blank so that is uses the users credentials when they log into the server.

 

Also, you will need to change the package name the WebVI is using to filter the list of systems.

0 Kudos
Message 6 of 11
(4,910 Views)

I was able to create a new user and password just fine. Now I'm poking around with setting permissions for that user, like assigning the user to a particular group on the Linux target and then adding specific permissions like FSRead. 

 

Is there a way to interact with salt commands via a CLI or is it just through the system states?

0 Kudos
Message 7 of 11
(4,794 Views)

If you want to use a CLI, you can either open cmd as admin and go to c:\Program Files\National Instruments\Shared\salt-master and run for example: salt "*" test.ping

 

You can use "*" to run it on every target or specify a specific minion ID along with many other binding types.

 

The other option is to ssh into the target just run something like: salt-call test.ping

 

You can find more documentation online at https://docs.saltstack.com/en/latest/ref/cli/salt-call.html

0 Kudos
Message 8 of 11
(4,786 Views)

I'm not a proficient CLI user by any stretch, so please forgive the questions that may seem obvious to others. Two questions:

 

1. When ssh'd into the target, i can run salt-call with arguments that are presented in the link you provided. However, I'm not sure how to format a command and arguments that would add a user (i.e. take the system state yaml @joshuap provided and do in CLI). 

 

2. What are the arguments to set a users permissions on a Linux target. In particular, I want to give a user "FSRead" and "FSWrite" permissions. 

0 Kudos
Message 9 of 11
(4,783 Views)

Have you found a way to add the FSRead permission?  I have the exact same need.

 

Patrick

0 Kudos
Message 10 of 11
(4,697 Views)