Switch user within a pattern?

Henrik Jutterst
Tera Guru

I'm creating a pattern for Oracle Database Catalogs and I have a user account that's running Discovery (disco-user). This user however can not access such as Catalot name. That information is available for the user oracle-user.

My question is, if it's possible to switch user from disco-user to oracle-user within a pattern using Linux su-command?

Ideally I'd have all access on disco-user, but what are the alternatives here, and are there any alternatives?

1 ACCEPTED SOLUTION

Hi and sorry for not answering earlier.

Apperently this switch and unswitch user have some issues and there is a KB article on that. https://hi.service-now.com/kb_view.do?sysparm_article=KB0852200

Doing what is suggested in this article helped me and it did change user. But I need to run the file using sudo -u <user> <filename> and that seems to be an issue as far as I know.

So the above KB article does NOT switch user as I wanted but it did change the user.

View solution in original post

5 REPLIES 5

SiD2
ServiceNow Employee
ServiceNow Employee

OOB Pattern Designer has this kind of operations to switch between users. There are 2 Operations "Change User" & "Unchnage user" which you can make use for your scenario.

Refer to below SNOW documentation links.

https://docs.servicenow.com/bundle/madrid-it-operations-management/page/product/service-mapping/task...

https://docs.servicenow.com/bundle/helsinki-it-operations-management/page/product/service-mapping/ta...

Hope these help you.

 

If this solves your problem, please mark my comment helpful and accept the answer...

Please mark Helpful / Accept Solution so that it helps others with similar questions.

Hi Sid and thanks for the reply.

I should definitely check this out and see where it takes me. I'll do an update if it solved my issue later.

SiD2
ServiceNow Employee
ServiceNow Employee

Hi @Henrik Jutterström,

Reiterating here to check if this helped?

Please mark Helpful / Accept Solution so that it helps others with similar questions.

Hi and sorry for not answering earlier.

Apperently this switch and unswitch user have some issues and there is a KB article on that. https://hi.service-now.com/kb_view.do?sysparm_article=KB0852200

Doing what is suggested in this article helped me and it did change user. But I need to run the file using sudo -u <user> <filename> and that seems to be an issue as far as I know.

So the above KB article does NOT switch user as I wanted but it did change the user.