One suggestion would be to see why the file can't be opened. You could change line 9 so it looks like this:
Code:open (OUT, '>', '/etc/valiases/$file') or die "$!";
One suggestion would be to see why the file can't be opened. You could change line 9 so it looks like this:
Code:open (OUT, '>', '/etc/valiases/$file') or die "$!";
If your like me, you had a couple of accounts getting utterly hammered with dictionary attacks and set the immutable bit on the persons file so theyt couldn't reset the domain back to having a catch all address. Try checking for an "i" with the list attributes command.
# lsattr
Thanks for sharing such a useful script among us!
Ok, fine...
My point there was this:
When it comes to something as basic as making a copy of something, if you're not sure how to do that, and you mess something up, how are you going to fix it?if anyone can guide my by step by step i can do the same without any trouble
So, copy the directory:
As for the script, we'll create the file and open it in one stepCode:cp -R /etc/valiases /etc/valiases.backup
Then paste or type the script into that file, press ctrl-x to save it then:Code:nano -w /def2fail.sh
That makes the script executable, then executes it.Code:chmod +x /def2fail.sh /def2fail.sh
Whoops... ya... missed that it was a perl script, so those instructions are correct...
the 'pico' line is the same basic thing as the 'nano' statement, while 'perl defrep.pl' is the command that executes it...pico -w defrep.pl
(paste in the script from the thread and exit)
perl defrep.pl
That should be it.
Sorry for the confusion there...
Your topic was helped me a lot, thanks!
chirpy, thank you a gazillion for saving me hours of work!
Keep up the great job, and thanks for sharing.