how to run a command line with another user without prompts for psw
Hi, I'm writing a script,
in the script I need to use tcpdump to capture some packets
however it needs root priviledge
my computer is configured by school and I have no real root priviledge
so I can't use sudo on my computer,like
I have to use a limited root username su4098
sudo tcpdump ......
and then use user su4098 as the root, with su4098 I can use tcpdump
since I want to run the tcpdump command in a script, I dont want to input the password mannualy
how can I run tcpdump command with su4098 without mannually input the password？
or specifically how can I change my username to su4098 without mannually inputing the password?