I have 2 users.
test1 that i created it with
/sbin/nologin and has no password.
test2 that has
sudo privilege and has passworsd.
I have this script:
/data/tempWork/fazitst that must be run under
test2. now i want to run this script with
test1 but i want it to be run under
I tried this as
/bin/su -c "/data/tempWork/fazitst " - test2
but it didn't work. i was running this command from an application since i can't use
ssh i can't debug this properly. there is no log. I tried this command with root and it worked.
but i guess that it requires password. so how i can run my script with
test2 with no password?