Written by

Senior Startups and Community Programs Manager at InterSystems Corporation
Question Evgeny Shvarov · Apr 9, 2023

Any chance I can provide a password to a vanilla iris docker instance?

Hi folks!

When I launch IRIS as a docker container instance, e.g. like this one:

docker run --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community

And then try to connect to it e.g. via irissqlcli it says I need to change the password:

irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Password change required

I know that I can open Management portal http://localhost:9092/csp/sys/UtilHome.csp and change password manually, but is there a programmatic way?

Say if I have a password in a file and I can just provide it to docker instance for the change?

Can anyone share the command line you use for that?

UPDATE:

Here is the approach. Start IRIS and disable password change requirement:

docker run --rm --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community -a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"

And another command to open sql terminal:

irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Use the approach only for development purposes.

Comments

Robert Cemper · Apr 9, 2023
Do ##class(Security.Users).UnExpireUserPasswords("*")
or
set Prop("Password")=NewPassword
set tSC=##class(Security.Users).Modify(Username,.Prop)

Classref1
 Classref2

0
Evgeny Shvarov  Apr 10, 2023 to Robert Cemper

Thanks @Robert Cemper !

But I want something I can use via CLI (Command line) interface in a non-interactive way.

0
Evgeny Shvarov  Apr 10, 2023 to Robert Cemper

Finally, here is how run iris docker container and use in SQL after that:

docker run --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community

and

docker exec -t iris-sql iris session iris -U %SYS '##class(Security.Users).UnExpireUserPasswords("*")'

And SQL connections now work!

$ irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Server:  InterSystems IRIS Version 2022.3.0.606 xDBC Protocol Version 65

Version: 0.5.1

[SQL]_SYSTEM@localhost:USER> select $zversion

+---------------------------------------------------------------------------------------------------------+

| Expression_1                                                                                            |

+---------------------------------------------------------------------------------------------------------+

| IRIS for UNIX (Ubuntu Server LTS for ARM64 Containers) 2022.3 (Build 606U) Mon Jan 30 2023 09:07:49 EST |

+---------------------------------------------------------------------------------------------------------+

1 row in set

Time: 0.047s

Thanks to @Robert Cemper and @Dmitry Maslennikov  
 

0
Dmitry Maslennikov  Apr 10, 2023 to Evgeny Shvarov

Or just add this to the end of docker run command

-a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"
0
Evgeny Shvarov · Apr 10, 2023

Finally, one command to run iris in docker:

docker run --rm --name iris-sql -d --publish 9091:1972 --publish 9092:52773 intersystemsdc/iris-community -a "iris session iris -U%SYS '##class(Security.Users).UnExpireUserPasswords(\"*\")'"

And another command to open sql terminal:

irissqlcli iris://_SYSTEM:SYS@localhost:9091/USER

Thanks to @Robert Cemper  and @Dmitry Maslennikov 
 

0
Jeffrey Drumm · Apr 10, 2023

This seems appropriate ... Vanilla IRIS

IRIS IRIS Baby ...

0
Evgeny Shvarov  Apr 11, 2023 to Jeffrey Drumm

heh )
Should I consider it as an accepted answer? :)

Nice hat, though! @Robert Cemper, do you have a such in your collection? 
 

0
Robert Cemper  Apr 11, 2023 to Evgeny Shvarov

Not that impressive. My skin is just pale and hairy.  Model OLD WHITE MAN

0
Evgeny Shvarov · Apr 12, 2023

There is a new release in intersystemsdc community images.

Now password and username can be provided as env variables.

Here it is:

docker run --rm --name iris-sql -d -p 9091:1972 -p 9092:52773 -e IRIS_PASSWORD=demo -e IRIS_USERNAME=demo intersystemsdc/iris-community

and

irissqlcli iris://demo:demo@localhost:9091/USER

Learn more.

0