Question
· Apr 24, 2017

How to enable OS level authentication from command line?

Hi,

I am able to enable OS level authentication for an instance from the UI (System Administration => Security => System Security => Authentication/CSP Session Options) but is there a way this can be done from command line as well?

Thanks,

Raghu

Discussion (7)1
Log in or sign up to continue

The AutheEnabled property is an integer value that is treated as a set of bitflags. Here's one way of decomposing it:

%SYS>set sc=##class(Security.System).Get(,.props)

%SYS>for bit=0:1:31 if $zboolean(props("AutheEnabled"),2**bit,1) write !,"Bit ",bit," is set"
 
Bit 4 is set
Bit 5 is set
Bit 6 is set
Bit 10 is set
%SYS>

Documentation for the $ZBOOLEAN function is here. You can use the OR operation (third argument = 7) to set a specific bit within the existing value. For example, to ensure bit 4 (whose meaning is AutheOS) is set:

set props("AutheEnabled")=$zboolean(props("AutheEnabled"),2**4,7)

If you are satisfied with my answer please click on the checkmark alongside its title.

You can also do this via ^SECURITY

%SYS>d ^SECURITY
 
1) User setup
2) Role setup
3) Service setup
4) Resource setup
5) Application setup
6) Auditing setup
7) Domain setup
8) SSL configuration setup
9) Mobile phone service provider setup
10) OpenAM Identity Services setup
11) Encryption key setup
12) System parameter setup
13) X509 User setup
14) Exit
 
Option? 12
 
1) Edit system options
2) Edit authentication options