On Tue, 16 Jan 2001, Binand Raj S. spewed into the ether:
> Rajesh Fowkar forced the electrons to say:
> > What I wanted to do here was to create a user for taking backups
> > and put the script for taking backup in that user's profile and
> > after the backup is over exit.
> > This user needed to have root permissions.
>
> Once again - you are opening a major hole in your system. Please
> consider using sudo - I had posted the link yesterday. This is just
> the kind of job for which sudo is ideal.
Hmmm, why not let the script run a a cron job from root's crontab?
mkdir -p /var/backup
chmod 700 /var/backup
chown root:root /var/backup

In the script
#!/bin/bash
cd /var/backup #This working directory is safe.
#do your stuff.
#clean any leftovers
rm -f *

Devdas Bhagat
--
Today, THREE WINOS from DETROIT sold me a framed photo of TAB HUNTER
before his MAKEOVER!

----------------------------------------------
LIH is all for free speech.  But it was created
for a purpose.  Violations of the rules of
this list will result in stern action.

Reply via email to