LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-18-2008, 04:38 AM   #1
unifiedquarks
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Rep: Reputation: 0
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.
 
Old 08-18-2008, 04:40 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
In your script, use the full path to adduser. Cron's PATH is more limited by default than your own shell's PATH.
 
Old 08-19-2008, 06:06 AM   #3
unifiedquarks
LQ Newbie
 
Registered: Dec 2005
Posts: 17

Original Poster
Rep: Reputation: 0
thanks a lot
 
Old 08-19-2008, 10:31 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670Reputation: 670
Why do you want to add a new user every minute?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Crontab does not create log file montblanc Linux - Newbie 4 02-05-2008 09:59 AM
crontab to add a user sizzlingdesi Linux - General 12 11-10-2006 04:07 AM
user crontab bujecas Linux - General 1 09-15-2006 06:49 AM
crontab --u user file binary_0011 Linux - Newbie 2 05-06-2006 06:14 AM
How to type in syntax to create a crontab with RH9 SoNewItHurts Linux - Newbie 5 02-20-2004 01:09 AM


All times are GMT -5. The time now is 12:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration