Running Unix scripts from SAS EG 4.3

Accepted Solution Solved
Reply
Contributor
Posts: 50
Accepted Solution

Running Unix scripts from SAS EG 4.3

Hi All

We need to execute Unix scripts using SAS Enterprise Guide 4.3. We have couple of business users moving from some other language to SAS on Unix (AIX). So we want to train them with SAS Enterprise Guide from the beginning. Right now we are able to connect to Unix server, run SAS programs, view logs, .lst s that residing on the Unix server. However we are unable to execute unix scripts residing on the server. We have multiple Unix scripts that trigger couple of SAS programs. We tried using x command. But it results in ERROR: Shell Escape is not valid for this session.

From Google I understood that system commands are disabled by default from EG. In order to execute, we need to either change the registry settings or admin has change the settings to allow the system commands. However in our case, users will not have any previlege to change the settings in their laptops as they are governed by security policies. Having admin change them in every laptop that has EG alone doesn't seem practical.

Is there any workaround for this? The primary purpose is to be able to execute Unix commands (primarily to execute shell scripts) from a SAS EG 4.3. Any suggestions would be appreciated.


Accepted Solutions
Solution
‎09-08-2013 04:48 PM
Super User
Posts: 3,257

Re: Running Unix scripts from SAS EG 4.3

Allowing EG users to execute X commands can be done with a simple setting change in SAS Management Console. This change then applies to all users connecting to the SAS server. 

In SMC, go to Server Manager in the SMC tree. Select the Workspace Server that EG users connect to (usually SASApp). Right click and select Properties. Under the Options tab choose Advanced Options and you should see this the following screen - just tick Allow XCMD and the job is done!

xcmd.png

View solution in original post


All Replies
Solution
‎09-08-2013 04:48 PM
Super User
Posts: 3,257

Re: Running Unix scripts from SAS EG 4.3

Allowing EG users to execute X commands can be done with a simple setting change in SAS Management Console. This change then applies to all users connecting to the SAS server. 

In SMC, go to Server Manager in the SMC tree. Select the Workspace Server that EG users connect to (usually SASApp). Right click and select Properties. Under the Options tab choose Advanced Options and you should see this the following screen - just tick Allow XCMD and the job is done!

xcmd.png

Contributor
Posts: 50

Re: Running Unix scripts from SAS EG 4.3

Hi SASKiwi. Thanks for the response. As per my understanding, this change needs to be done by SAS Admin. Am I right?

As I am new to SAS EG, please correct me if I have stated anything wrong.

Super User
Posts: 3,257

Re: Running Unix scripts from SAS EG 4.3

It can be done by anyone who has access to SAS Management Console, and has "SAS Administrator" rights to modify SMC settings.

Contributor
Posts: 50

Re: Running Unix scripts from SAS EG 4.3

Thank you so much.

And one final query. Slightly unrelated to originial post. We have some excel files getting created in the Unix server. Is there any way that we can push them in to Windows using any available options ? We definitely can do it with ftp, but just wanted to know it something can be done using EG itself..

Super User
Posts: 3,257

Re: Running Unix scripts from SAS EG 4.3

How are the Excel files being created in the first place? If they are being created on the server It would make sense to have a server process to copy them to Windows.

Super Contributor
Posts: 644

Re: Running Unix scripts from SAS EG 4.3

If you create the Excel files in an EG process you can specify a local (Windows) destination for the files.

Richard

Trusted Advisor
Posts: 3,215

Re: Running Unix scripts from SAS EG 4.3

You are using SAS Eguide as interface to Unix.

The default setting (metadataserver) of Workspaceservers is not to allow X-cmds.  So ask your platform admin to open up that.

(See SASkiwi reply you know already )

The reason that is closed is because using the OS Unix is seen as very dangerous and should be lockdown.

As long as you Unix session (OS level) has a strict organized security this is a humbug argument.


You will find a lot on security with SAS IT-staff down want to have your SAS users/people to get a personal key on Unix as this would be too difficult to get organized into common in place RBAC (Role Based Acess Control) procedures. If you are into this situation you are getting into problems as all users wil getting to share one single account like "sassrv".  As you want to run OS commands SAS cannot control those security requirements.

This part will be the most difficult part to solve. The Unix environment is with that aspect quite different compared to Windows. A central security officer controlling the data does not exist. The owner (creator of data) has this responsability. That are your users.  

When running SAS-Eg on a Desktop you are already identified. The security is well organized. There is no need to eliminate the X-cmd faciltye as users already have the same rights with the Windows Explorer. SAS closed  the X-cmd at Windows with SASv 9.1 and 9.2 and you needed a Windows registry setting for that. With SAS 9.3 that has been set open again.       

SAS EG is supporting some interfaces on importing Excel files and downloading it is running on your desktop.  

That does not support Windows X-cmds by its own. By that you are missing all the Windows local interfaces in that way.

Having "SAS/Access PC files" licensed you could run (installing configurign) the PC-Files server in a Windows environment.

Possible you have also the SAS Addin Microsoft Office (Amo) that is integrating SAS more directly into all of them.

---->-- ja karman --<-----
🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

Discussion stats
  • 7 replies
  • 2272 views
  • 4 likes
  • 4 in conversation