LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Running script as user that does not have shell (https://www.linuxquestions.org/questions/linux-general-1/running-script-as-user-that-does-not-have-shell-174098/)

sschueller 04-24-2004 01:36 PM

Running script as user that does not have shell
 
I'm trying to run a script that converts mbox to maildir. The sript needs to be run as the user that I'm converting the mailbox but all my users except for a few do not have shell access.

When I do "su user -c "script" as root it doesn't work. It only works if the user has shell like /bin/bash.

Is it even possible to run commands as users that don't have shell access? In my case they all have /bin/false.

thanks

-Stefan

david_ross 04-24-2004 03:06 PM

Try invoking a new shell:
su - user -c "script"


All times are GMT -5. The time now is 05:18 PM.