Saturday, January 22, 2005

DR. SUDOER and how learn to stop worrying and love rm -rf

I wiped my my / directory from a wayward script
rm -rf $(DIRECTORY)/*
the define for DIRECTORY was empty so what i got was
rm -rf /* great! luckly my /home directory was
located on diferent physical partition and
rm choked ... but i lost my subversion repos.

ok i have been lazy i never wanted to move
to using sudo ... but guess what i am moving
now.
here is my sudo file:

# User privilege specification
root ALL=(ALL) ALL
ptxdist ALL=(root) NOPASSWD:/usr/bin/patch,NOPASSWD:/bin/rpm,NOPASSWD:/bin/mount
,NOPASSWD:/bin/cp,NOPASSWD:/bin/umount,NOPASSWD:/usr/bin/install,NOPASSWD:/bin/r
m,NOPASSWD:/bin/mv,NOPASSWD:/bin/tar,NOPASSWD:/bin/cpio,NOPASSWD:/bin/chown,NOPA
SSWD:/bin/mkdir,NOPASSWD:/usr/bin/strip,NOPASSWD:/bin/mknod

and i have started replacing the above commands in $ defines in the
makefiles.

No comments: