You are not logged in.

#1 2005-09-10 12:10:09

alex1969
Member
From: Italy
Registered: 2005-09-10
Posts: 17

dcron questions

I'have a server with archlinux in my home, and i would to configure dcron in the best way....

My server has some users accounts, and i would to deny the use of crontab to some of this users. How can do it? smile

Sorry for my bad english but i'm italian smile smile smile

I hope you will answer as soon as possible... thanks

Offline

#2 2005-09-10 13:15:08

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: dcron questions

Sadly, it seems dcron has no functionality of allowing/denying given users, just as genuine vixie cron has. However, there are fcron and anacron packages in AUR, you could check 'em.

Offline

#3 2005-09-10 13:15:17

SleepyDog
Member
Registered: 2004-10-15
Posts: 114

Re: dcron questions

Create a file /etc/cron.deny with the usernames you want to deny (1 per line)

Or, you can create /etc/cron.allow with the only users you want to allow.

Offline

#4 2005-09-10 13:51:12

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: dcron questions

cron.[deny|allow] files work only for vixie cron, SleepyDog.

However, I've found a way to make dcron work on user-basis.

groupadd cron
chown root.cron /usr/bin/crontab
chmod 4750 /usr/bin/crontab

Now add users you want to allow to use cron to cron group.

Offline

#5 2005-09-10 14:33:09

alex1969
Member
From: Italy
Registered: 2005-09-10
Posts: 17

Re: dcron questions

lucke wrote:

Sadly, it seems dcron has no functionality of allowing/denying given users, just as genuine vixie cron has. However, there are fcron and anacron packages in AUR, you could check 'em.

Yes, infact i tried to use cron.deny, but it doesn't work, because dcron in archlinux repository is the Dillon's Cron Daemon, and it doesn't support cron.deny or cron.allow sad

Ok, so i must create group cron and change the group of /usr/bin/contrab from root:root to root:cron

I would have use fcron in AUR but it's unsupported and not community.... sad

I hope that fcron become community as soon as possible, because it's very powerful....!!!

Thanks

Alex1969

Offline

#6 2005-09-10 19:11:38

alex1969
Member
From: Italy
Registered: 2005-09-10
Posts: 17

Re: dcron questions

I'have another problems with dcron: sad sad sad

I did this command:

groupadd cron
chown root:cron /usr/bin/crontab
chmod 750 /usr/bin/contrab

and

gpasswd -a alessandro cron

to give permissions to alessandro, but when i do

crontab -e

to edit alessandro's crontab,  i receive this message:

10-Sep-2005 21:05  initgroups failed: alessandro Operation not permittedunable to create /var/spool/cron/alessandro.new: Permission denied
unable to append to /var/spool/cron/cron.update

smile smile smile


so i did this (as root)

chown root:cron /var/spool/cron/
chmod 775 /var/spool/cron/ 

but doing crontab -e (as alessandro) i recive:

10-Sep-2005 21:09  initgroups failed: alessandro Operation not permitted

and vi editor don't starts to edit crontab...... sad sad sad

How can i do?

Thanks, alex1969

Offline

#7 2005-09-10 20:57:41

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: dcron questions

Try chmodding /usr/bin/crontab 4750, not mere 750.

-edit-
Pst, Penguin, move off my frequency ;-)

Offline

#8 2005-09-10 20:57:51

T-Dawg
Forum Fellow
From: Charlotte, NC
Registered: 2005-01-29
Posts: 2,736

Re: dcron questions

its chmod 4750. The 4 in the beginning sets the file to SUID (set user ID) which gives permitted users rights to run the program with owner privaleges, in this case root, which is what you need.

Offline

#9 2005-09-11 08:59:47

alex1969
Member
From: Italy
Registered: 2005-09-10
Posts: 17

Re: dcron questions

Thanks, it's all ok naw!!!!! smile smile smile

Offline

Board footer

Powered by FluxBB