Disable all users from the Sys_user table, either at once or in bulk, and then enable them again

Patrick Rajao
Giga Expert

Hi! Please, I would like to know if I can deactivate all users from the Sys_user table, at once, and then activate them again.
I'm not an expert in Scripts, so I resorted to the community.
I emphasize that I need to temporarily disable all users, but I cannot disable my user and admin users.

 

Best regards.

 

Patrick Rajão

3 ACCEPTED SOLUTIONS

Hi, I would not see user behavior as a good reason to implement this sort of work-around

 and the most probable result would be that the users involved will log faults indicating that they cannot login etc, their session doesn't respond etc.

 

I would configure an exchange distribution list that covers all users with access to your instance,
- often organizations have an 'All' user dist list which would be considered suitable.

Then if you don't already

  • Log each outage in ServiceNow as a change request.
  • From the change request use the quick email message to warn the dist list of any pending outage message in advance (using whatever timeframe your organization uses).
  • 10 minutes before the change window starts send a warning\reminder that the change window is about to begin and that users must log out within 5 minutes.
  • At the start of the change window IE 5 minutes after the warning time, terminate all user sessions that are unwanted.

Solved: how to kill all user sessions - ServiceNow Community

  • At the end of the window, send an update advising the change has been completed and users can now login.

 

For any incident raised during the window, close it with the comments that this was not a fault and it occurred within a notified scheduled change window, including the change number.


Regularly review Incidents created by users during these change windows.
For any repeat offenders you can share a report with the relevant management teams making it clear that the user behavior is inappropriate, and they are unnecessarily consuming company resources.

 

View solution in original post

Or, couldn't you just redirect the instance URL to an information page?

View solution in original post

@Tommy SN Sahlin yes you could probabaly redirect users, as long as you allowed for the users that still needed instance access. Or you could lock the accounts of non-core users (in my opinion a better option than deactivating the accounts).

The point is that all options come with some sort of admin overhead and\or risk, and none of this should be necessary in the BAU day to day life of an operational environment.
Process and clearly defined behavioral expectations are the most efficient and appropriate solution.

View solution in original post

5 REPLIES 5

@Tommy SN Sahlin yes you could probabaly redirect users, as long as you allowed for the users that still needed instance access. Or you could lock the accounts of non-core users (in my opinion a better option than deactivating the accounts).

The point is that all options come with some sort of admin overhead and\or risk, and none of this should be necessary in the BAU day to day life of an operational environment.
Process and clearly defined behavioral expectations are the most efficient and appropriate solution.