gerardkok / puppet-reposado

Puppet module to manage Reposado
Apache License 2.0
0 stars 5 forks source link

Reposado user can't crontab (and there's no git clone) #3

Closed llauren closed 6 years ago

llauren commented 7 years ago

Am i just dumb or what's the matter when...

% sudo puppet agent -t
... 
Notice: /Stage[main]/Reposado/Cron[repo_sync]/ensure: created
The user reposado cannot use this program (crontab)
Notice: Applied catalog in 5.94 seconds

If i sudo su - reposado and crontab -e, on the first time, i'm prompted for which editor to use, but that doesn't change anything; the module can't run crontab as reposado.

Possibly related to that, i don't see a git checkout of the reposado repo (main.pp line 68, vcsrepo -- i wish i knew how to create a direct link from this issue to the relevant line in the code), so in effect, this module doesn't do anything for me :)

Disclaimer: It's late and it's probably just my fault.

Environment: Ubuntu 14.04 LTS.

gerardkok commented 7 years ago

I cannot reproduce it on 14.04.5, but I expect the checkout has gone wrong, as you suggest. Can you perhaps run puppet agent -tv --debug and post the output (maybe through a gist if it is too long)?

llauren commented 7 years ago

Sure! I'll check it out ~tomorrow~ Wednesday at work.

llauren commented 7 years ago

Found the "error". There's an empty /etc/cron.allow file for hardening, so the reposado user won't be allowed to cron. I'm now experimenting whether i can put a file /etc/cron.d/reposado with root as the file owner but reposado as the user for the cron job, even if the reposado user isn't allowed to use cron(tab).

The simple solution would of course be to add reposado into cron.allow.

llauren commented 6 years ago

I don't have this problem anymore, so it can be closed :)