This is pretty good documented somewhere in InterSystems documentation, but usually I cannot find it when I need it. That is the reason why I posted it here.
ccontrol start <cache-instance-name> /EmergencyId=<username>,<password>
The only user that can login now is the one that has been defined above.- cache-instance-name = The name of your instance (use
ccontrol list
to find out) - username = a temporary username (only valid for this session)
- password = a temporary password (only valid for this session)
- Open the Management Portal in a browser and login as your temporary user.
- Change the password for the superuser. (Unfortunately have all other predefined users e.g. _SYSTEM, Admin, CSPSystem a.s.o. still the same unknown password and you might have to change their passwords as well.)
- Restart the cache instance
ccontrol stop <cache-instance-name> restart
- Now you should be able to login as superuser
P.S. A friendly user told me that the “/” in front of EmergencyId is not necessary. I don’t know if this is just a typo and cannot check it right now so I left my article it as it is. Please test it with and without the “/” and let me know which one is working for you. Thank you.
Thanks for the blog. There’s a correction in the command. ‘/’ isn’t supposed to be there. Atleast not on Linux/Unix
ccontrol start EmergencyId=,
Hello Chi,
Thank you for the reply. I added a note to the article.
Regards,
J.
Hi, we run a few cache servers (Windows) and I tested this in Cache 2016….the forward slash is needed in W2012 / cache 2016, from a cmd in the bin directory of the servers cache install;
e.g.
cmd
cd c:\intersystems\cache\bin\
type….
ccontrol start cache /EmergencyId=Andy,Password1999
this started the local instance called “Cache”
however you could login to the portal in a browser but nothing loaded, you could run a terminal though…..so the next best thing is, use terminal on the server…login with temp user and password, change to the %SYS namespace (zn “%SYS”) now run…
%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?
>>>>>>>>>>
proceed and change passwords this way.
then when you try and shut cache down it opens a terminal automatically on the server and asks for the emergency credentials as precaution, this makes perfect sense dependent on what you are doing an emergency start up for I guess…….
e,g
when shutting down the emergency instance….
Username: Andy
Password: ************
Cache Shutdown Status: time & date
0 interactive jobs (Telnet/Lat)
0 background jobs (from job command)
0 Cache Direct server jobs
0 CSP server jobs
0 ODBC server jobs
12 system jobs
Do you want to broadcast a message to anyone? No => no
Do you want to see the Cache status report? No => no
Do you want to run the user defined shutdown routine? Yes => no
Are you ready for the system to halt? Yes => yes
done
start as normal and you should have full access.
this was in Cache 2016.
Wow Andy, you save my live! Thank you very match!