All I need to do is to run a specific script as a particular user who does have the
nologin/false shell indicated in
I would run the script as root and this should run as another user. Running:
~# su -c "/bin/touch /tmp/test" testuser
would work, but I need a valid shell for the testuser.
I know I can disable the password with
passwd -d testuser and leave the shell to
/bin/bash this way would secure a little bit but I need to have
Basically what I need is what
crontab does when we set jobs to be running as a particular user, regardless this one has
p.s I found this thread Executing a command as a nologin user, but I have no idea how to
concatenate the command
su -s /bin/sh $user to the script I need to run.