Admin
My new post has me doing a lot more admining than I had been at the last job and I am tackling some neat stuff.
New things learned today:
1: Perl does not like it when you use shell pipes in backticks (ie. `cat foo | grep bar` won’t work.) You have to use ‘exec’… exec “cat foo | grep bar”;
2: sshd does not try to keep connections open by default (meaning, it will drop you if there is no data sent to the server after a certain amount of time). You can change this by editing /etc/ssh/sshd_config, and editing the lines ‘ClientAliveInterval 0′ and ‘ClientAliveCountMax 3′ ( make those whatever you like, I used 30 b/c I locked myself out of a server today testing /etc/hosts.deny ;)
It seems to be working.
Until next time!
perl -e 'print `cat /etc/passwd | grep root`'seems to work for me. Maybe something odd re: usage?Ok, this is very strange. :)
I went back to look at the script and the line I recall giving me problems was:
`mysqldump $db | gzip > $db.$time.gz`;
I put that in a script by itself, and the damn thing ran. Now I have no idea why that is happening. :) Must research further!