To remove the beeps on the console, we can do this:
# setterm -blen 0
Then we can put this line on /etc/rc.d/init.d/rc.local
every time your Linux box boot it will read the above line and
this will end the beeps on linux console.
Thursday, January 3, 2008
Linux Tip - Keymap
To change console keymap in debian:
# dpkg-reconfigure console-tools
if that doesn't work, perhaps:
# apt-get install console-data console-tools debconf
and
# apt-get update
# dpkg-reconfigure console-tools
if that doesn't work, perhaps:
# apt-get install console-data console-tools debconf
and
# apt-get update
Tuesday, November 13, 2007
"Wait" command in Windows
To make a basic "wait" command in windows we can do like this:
: ping 127.0.0.1 -n 5 -w 5000 > nul
this command will do a wait for 5 secs.
Could be usefull
: ping 127.0.0.1 -n 5 -w 5000 > nul
this command will do a wait for 5 secs.
Could be usefull
Wednesday, August 1, 2007
Remove Sendmail
Here's how to remove sendmail from your system.
Use it "at your on risk"
- Check for sendmail in /etc/init.d/
# ls -la /etc/init.d
# chmod -x /etc/init.d/sendmail - remove the execute
- Find sendmail in your boot scripts. It's usually in either /etc/rc or
/etc/init.d/sendmail. It looks like
sendmail -bd -q15m
-q15m means that it should run the queue every 15 minutes; you may
see a different number. Comment out this line.
- Kill the sendmail daemon. You should first kill -STOP the daemon; if
any children are running, you should kill -CONT, wait, kill -STOP
again, and repeat ad nauseam. If there aren't any children, kill
-TERM and then kill -CONT.
- Check whether you have any messages in the sendmail queue,
/var/spool/mqueue. If you do, you will have to try flushing them with
sendmail.bak -q. If necessary, wait a while and run sendmail.bak -q
again. Repeat until the queue is empty. This may take several days.
or delete the messages :)
# rm /var/spool/mqueue/*
# rm /var/spool/mqueue-client/*
- Check the crons
# ls -a /etc/cron*
- check if there are any sendmail files
- and rename or delete them
- Remove the setuid bit on the sendmail binary, to prevent local users
from gaining extra privileges through sendmail's security holes. The
binary may be at several different locations:
# chmod 0 /usr/lib/sendmail
# chmod 0 /usr/sbin/sendmail
# chmod 0 /usr/lib/sendmail.mx
- Move the sendmail binary out of the way:
# mv /usr/lib/sendmail /usr/lib/sendmail.bak
# mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
- Check and remove the users if you want:
# more /etc/passwd -- check for smmsp, smmta
# userdel smmsp -- delete the user smmsp
# userdel smmta -- delete the user smmta
Subscribe to:
Posts (Atom)