Ubuntu – Cron error: bad username

bashcommand linecronscripts

I've basically re-written the terminal output instead of appending a series of edits to this question:

root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# tail /var/log/syslog 
Dec 21 11:35:01 doge cron[820]: (*system*doge2) RELOAD (/etc/cron.d/doge2)
Dec 21 11:35:01 doge cron[820]: Error: bad username; while reading /etc/cron.d/doge2
Dec 21 11:35:01 doge cron[820]: (*system*doge2) ERROR (Syntax error, this crontab file will be ignored)
Dec 21 11:38:01 doge cron[820]: Error: bad command; while reading /etc/cron.d/doge3
Dec 21 11:38:01 doge cron[820]: (*system*doge3) ERROR (Syntax error, this crontab file will be ignored)
Dec 21 11:56:01 doge cron[820]: Error: bad command; while reading /etc/cron.d/doge4
Dec 21 11:56:01 doge cron[820]: (*system*doge4) ERROR (Syntax error, this crontab file will be ignored)
Dec 21 11:56:01 doge cron[820]: (*system*doge) RELOAD (/etc/cron.d/doge)
Dec 21 11:56:01 doge cron[820]: Error: bad command; while reading /etc/cron.d/doge
Dec 21 11:56:01 doge cron[820]: (*system*doge) ERROR (Syntax error, this crontab file will be ignored)
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# cat doge
* * * * * /home/digger/webxass
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# cat doge2
* * * * * /home/digger/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O <user>.<worker>:<worker_password>

root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# cat doge4
* * * * * /home/digger/webxass
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# cat /home/digger/webxass 
/home/digger/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O <user>.<worker>:<worker_password>
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# /home/digger/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O <user>.<worker>:<worker_password>
[2013-12-21 11:57:09] 1 miner threads started, using 'scrypt' algorithm.
[2013-12-21 11:57:09] Starting Stratum on stratum+tcp://doge.pool.webxass.de:3333
[2013-12-21 11:57:09] Stratum detected new block
[2013-12-21 11:57:11] thread 0: 4104 hashes, 6.24 khash/s
[2013-12-21 11:57:43] Stratum detected new block
[2013-12-21 11:57:43] thread 0: 211512 hashes, 6.46 khash/s
[2013-12-21 11:58:43] thread 0: 387384 hashes, 6.47 khash/s
[2013-12-21 11:58:48] Stratum detected new block
[2013-12-21 11:58:48] thread 0: 32964 hashes, 6.47 khash/s
^C
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# cat /home/digger/webxass
/home/digger/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O <user>.<worker>:<worker_password>
root@doge:/etc/cron.d# 
root@doge:/etc/cron.d# su digger
digger@doge:/etc/cron.d$ 
digger@doge:/etc/cron.d$ /home/digger/webxass 
[2013-12-21 11:59:51] 1 miner threads started, using 'scrypt' algorithm.
[2013-12-21 11:59:51] Starting Stratum on stratum+tcp://doge.pool.webxass.de:3333
[2013-12-21 11:59:51] Stratum detected new block
^Cdigger@doge:/etc/cron.d$ 

There's some sort of syntax error, but I don't know what it is.

I really don't understand the "bad username" error, digger is a valid user. Which username is bad? The digger username in the system?

Best Answer

  • * * * * * digger /home/digger/webxass
    

    is the correct syntax.

  • Related Question