Skip to main content
Question

Switch user in worklet

  • December 15, 2022
  • 1 reply
  • 60 views

Forum|alt.badge.img

Can you su to different user to run a worklet instead of root user in linux? 

 

1 reply

  • Automox Employee
  • December 16, 2022

Hello,

Yes, that is possible to do. For example, if you run this as your Remediation Code...

#!/bin/bash

su -c whoami <username>

...the Worklet’s output will be “<username>”.

Hope this helps.