check linux configuration files syntax for errors

OpenSSH/usr/sbin/sshd -t && echo $?
/usr/sbin/sshd -T
Apache/usr/sbin/apache2 -t
apachectl configtest
nginx/usr/local/nginx/sbin/nginx -t
/usr/local/nginx/sbin/nginx -t -c /usr/local/nginx/conf/nginx.conf
lighttpd/usr/local/sbin/lighttpd -t -f /usr/local/etc/lighttpd/cyberciti.biz/lighttpd.conf
Bind (named server config)named-checkconf /etc/named.conf
Bind (zone syntx)named-checkzone cyberciti.biz /var/named/zone.cyberciti.biz
Squid proxy/usr/sbin/squid -k check
/usr/sbin/squid -k parse
MySQL servermysqld –verbose –help
/usr/libexec/mysqld –verbose –help 1>/dev/null
Postfix MTApostfix check
postfix -vvv
Samba SMB/CIFStestparm -v
tcpdtcpdchk
tcpdchk -v
dhcpd (DHCP / BOOTP) serverdhcpd -t -cf /path/to/dhcpd.testing.conf
vsftpd servervsftpd -olisten=NO /path/to/vsftpd.testing.conf
nagiosnagios -v /path/to/testing/nagios.cfg
Openntpd NTPD serverntpd -d -f /usr/local/etc/ntpd.conf -n
Xorg (X11 Server)Xorg -config /path/to/xorg.conf.new -retro
syslogd / rsyslogdrsyslogd -c4 -f /etc/rsyslog.testing.conf -N 1
CUPS Printing Systemcupsd -f -c /path/to/cupsd.testing.conf -t
slapd (OpenLDAP)slapd -Tt
varnishdvarnishd -C -f /path/to/wordpress.vlc
exim MTAexim -bV
Bash/Ksh scriptsbash -n ./myscript
ksh -n /path/to/script.ksh
BSD pf firewallpfctl -nf /etc/pf.conf
proftpdproftpd -t -c /path/to/proftpd.testing.conf
Perl scriptsperl -c /path/to/script.pl
perl -wc /path/to/script.pl

http://www.cyberciti.biz/tips/check-unix-linux-configuration-file-for-syntax-errors.html

 

testsaslauthd “connect() : No such file or directory 0”. | postfix | postfix/smtpd[11571]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory

the problem is simple

first we have to delete

rm -rf /var/run/saslauthd

and after that we can create the symbolic link

ln -s /var/spool/postfix/var/run/saslauthd /var/run/saslauthd

 

 

W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3

W: Possible missing firmware /lib/firmware/tigon/tg3_tso5.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3_tso.bin for module tg3
W: Possible missing firmware /lib/firmware/tigon/tg3.bin for module tg3

The machine s Dell poweredge 1750 and.. here is the solution

vim /etc/apt/sources.list

and add..

deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free

deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free

 

apt-get update

apt-get install firmware-linux-nonfree





get hard disks serial numbers in linux или как да видим серийните номера на хард дисковете през линукса който използваме

можем видим или да вземем  серийните номера на нашите хард дискове чрез инструмента hdparm

hdparm -I /dev/sd? | grep -E “Number|/dev”
/dev/sda:
Model Number: WDC XXxxxxXXXX-XXXXXX
Serial Number: WD-XXXXxXXXXXXX
/dev/sdb:
Model Number:WDC XXxxxxXXXX-XXXXXX
Serial Number:  WD-XXXXxXXXXXXX

converting .rmp to .deb или конвертиране от .rpm към .deb

за да конвертираме  от .rpm  към .deb пакет използваме инструмента alien

apt-get install alien

wget ftp://rpmfind.net/linux/fedora/linux/development/rawhide/x86_64/os/Packages/o/ocsinventory-2.0.5-4.fc18.noarch.rpm

alien ocsinventory-2.0.5-4.fc18.noarch.rpm

-rw-r–r– 1 root root 8160 Sep 18 09:30 ocsinventory-2.0.5-4.fc18.noarch.rpm
-rw-r–r– 1 root root 2188 Sep 18 09:30 ocsinventory_2.0.5-5_all.deb

 

 

как да променим скоростта на мрежовия адаптер(лан карта) в линукс

чрез инструментите mii-tool и ethtool можем да променим скоростта на лан картата .

apt-get install ethtool net-tools

ethtool -s eth1 speed 100 duplex full

или

mii-tool -F 100baseTx-HD

можем да върнем настройките по подразбиране на мрежовия адаптер

mii-tool –reset eth1