[comp.unix.xenix] Logging In as UUCP to Set crontab

markd@silogic.UUCP (Mark DiVecchio) (08/07/90)

I don't quite understand how I get a new uucp owned crontab into
/usr/spool/cron/crontabs. 

Any other user can type:	crontab <file>

and that file is transfered into /usr/spool/cron/crontabs with correct
ownership and cron itself is alerted to the fact that a new crontab has
been loaded. 

To do this for uucp, I need to login as uucp but, of course, the login
shell is uucico so that won't work. 

If I login as root and copy the crontab into /usr/spool/cron/crontabs
and set up the ownership with chown and chgrp, cron is not alerted to
the new crontab until, apparently, I reboot.

Ideas?

-- 
Mark DiVecchio, Silogic Systems, 619-549-9841                       K3FWT
-----   9888 Carroll Center Road, Suite 113, San Diego, CA 92126    -----
markd@silogic                                  BBS 619-549-3927
...!ucsd!celerity!celit!silogic!markd     celerity!silogic!markd@ucsd.edu

shwake@raysnec.UUCP (Ray Shwake) (08/09/90)

markd@silogic.UUCP (Mark DiVecchio) writes:

>I don't quite understand how I get a new uucp owned crontab into
>/usr/spool/cron/crontabs. 

>To do this for uucp, I need to login as uucp but, of course, the login
>shell is uucico so that won't work. 

	Many older implementations of UNIX and Xenix are delivered with
only a single uucp-related login - that being "uucp", running the uucico
shell. By current convention, this is incorrect.

	Each site should have a uucp ADMINISTRATIVE login to perform any
uucp-related support activities (like configuring tty lines, remote logins).
In addition, one or more daemon logins are required, which would run the
uucico shell.

	Once accomplished in this fashion, user "uucp" can login, run
his "crontab -l" routine, etc. This approach has the additional advantage
of eliminating yet another reason to run as "root".

jpp@tygra.ddmi.com (John Palmer) (08/16/90)

In article <25@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes:
>markd@silogic.UUCP (Mark DiVecchio) writes:
>
>>I don't quite understand how I get a new uucp owned crontab into
>>/usr/spool/cron/crontabs. 
>
>>To do this for uucp, I need to login as uucp but, of course, the login
>>shell is uucico so that won't work. 

Real simple: Login as root, and do this:

    cd /usr/spool/cron/crontabs
    cp /dev/null uucp
    chown uucp uucp
    chgrp uucp uucp
    chmod 644 uucp

Then, edit the file, put in the commands, kill the current cron process
(I'm SORRY - but regardless of what SCO says, the cron process 
DOES NOT periodically
 check the crontab files and update its internal database)
and then restart cron by typing /etc/cron.

-- 
=  CAT-TALK Conferencing Network, Prototype Computer Conferencing System  =
-  1-800-825-3069, 300/1200/2400/9600 baud, 8/N/1. New users use 'new'    - 
=  as a login id.   E-Mail Address: jpp@ThunderCat.COM                    =
-           <<<Redistribution to GEnie PROHIBITED!!!>>>>                  -

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (08/19/90)

In article <350@tygra.ddmi.com> jpp@tygra.UUCP (John Palmer) writes:
| In article <25@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes:
| >markd@silogic.UUCP (Mark DiVecchio) writes:
| >
| >>I don't quite understand how I get a new uucp owned crontab into
| >>/usr/spool/cron/crontabs. 
| >
| >>To do this for uucp, I need to login as uucp but, of course, the login
| >>shell is uucico so that won't work. 

  Create an entry for maintaining uucp things. Same UID and GID as uucp,
login dir /usr/lib/uucp, and you favorite login shell. I call mine
uumaint, and it is on every system I run. Usual rules about a good
password on a system account, of course.
| 
| Real simple: Login as root, and do this:

	[ complex procedure described ]
| 
| Then, edit the file, put in the commands, kill the current cron process
| (I'm SORRY - but regardless of what SCO says, the cron process 
| DOES NOT periodically
|  check the crontab files and update its internal database)
| and then restart cron by typing /etc/cron.

  cron seems to read new entries on SCO xenix and unix for me. The
crontab and at commands send a signal to tell it to reread. That's a lot
less likely to cause trouble that restarting it.
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me

bob@consult.UUCP (Bob Willey) (08/19/90)

In article <1534@sixhub.UUCP> davidsen@sixhub.UUCP (bill davidsen) writes:
>In article <350@tygra.ddmi.com> jpp@tygra.UUCP (John Palmer) writes:
>  cron seems to read new entries on SCO xenix and unix for me. The
>crontab and at commands send a signal to tell it to reread. That's a lot
>less likely to cause trouble that restarting it.


Just got hold of a "safe" way to restart cron.
1.   crontab -l > foo.bar
2.   crontab foo.bar

This will get all of your entries with the list option in 1.
and then restart cron with these entries in step 2.

Hope this helps, as we had quite some problems dealing with cron
until this work around came.

-- 
>.. CCS Enterprises, Inc.           ..    Bob Willey, CDP     ..<
>.. P.O. Drawer 1690                ..    uunet!consult!bob   ..<
>.. Easton, Maryland  21601         ..    (301) 820-4670      ..<
>.......................BBS: (301) 476-5098.....................<

itkin@mrspoc.Transact.COM (Steven M. List) (08/22/90)

jpp@tygra.ddmi.com (John Palmer) writes:

>In article <25@raysnec.UUCP> shwake@raysnec.UUCP (Ray Shwake) writes:
>>markd@silogic.UUCP (Mark DiVecchio) writes:
>>
>>>I don't quite understand how I get a new uucp owned crontab into
>>>/usr/spool/cron/crontabs. 
>>
>>>To do this for uucp, I need to login as uucp but, of course, the login
>>>shell is uucico so that won't work. 

>Real simple: Login as root, and do this:

Nothing personal, John, but this is awfully kludgy.  I use something
that feels much simpler.

Log in as root, create the crontab, and then install it by using the
command "su uucp -c 'crontab file'"!

If you want to edit uucp's (or any other user's) crontab, you log in
as root and then start with "su uucp -c 'crontab -l > file'".  Then
edit it.  Then install it as indicated above.

I do this for uucp, news, and others of their ilk.
-- 
 +----------------------------------------------------------------------------+
 :                Steven List @ Transact Software, Inc. :^>~                  :
 :           Chairman, Unify User Group of Northern California                :
 :     {apple,coherent,limbo,mips,pyramid,ubvax}!itkin@guinan.Transact.COM    :