LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   crontab cant create user (https://www.linuxquestions.org/questions/linux-newbie-8/crontab-cant-create-user-663532/)

unifiedquarks 08-18-2008 03:38 AM

crontab cant create user
 
Hii

I have the following script (named /root/addNewUser.sh) to add new users automatikally. The script is automatically created every minutes

#!/bin/bash
adduser xxx-xxx -s /bin/false

and I have the following enrty at crontab
*/1 * * * * /root/addNewUser.sh >/root/newUser.log


even if I am able to create users by above script using command line like:

# addNewUser.sh

the users cant be created by crontab.

Mr. C. 08-18-2008 03:40 AM

In your script, use the full path to adduser. Cron's PATH is more limited by default than your own shell's PATH.

unifiedquarks 08-19-2008 05:06 AM

thanks a lot

jschiwal 08-19-2008 09:31 AM

Why do you want to add a new user every minute?


All times are GMT -5. The time now is 07:00 AM.