nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Linux Commands for checking errors in server config files

This is a discussion on Linux Commands for checking errors in server config files within the CentOS / RHEL / Fedora forums, part of the Linux Distribution category; Hi all, This is a question to just enhance knowledge on Linux server administration.In dns we have some error checking ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Linux Distribution > CentOS / RHEL / Fedora

Linux answers from nixCraft.


CentOS / RHEL / Fedora Discussion about Redhat Enterprise Linux or CentOS or Fedora Linux related problems.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-01-2009, 04:58 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 334
Thanks: 12
Thanked 13 Times in 11 Posts
Rep Power: 4
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default Linux Commands for checking errors in server config files

Hi all,

This is a question to just enhance knowledge on Linux server administration.In dns we have some error checking commands like
named-checkzone and named-checkconf to check any syntax errors in server
like wise we have following command for different servers

vsftpd check for syntax error
Code:
 vsftpd
BIND DNS Server check for syntax and zone errors:
Code:
named-checkconf  
named-checkzone
SAMBA check config errors
Code:
testparm
APACHE check for syntax error:
Code:
 httpd -t
so my query is.. there will be some commands for the following servers too squid,sendmail,postfix,dovcot etc
please post if you know other commands which will be used for error checking of server config files.

Thanks,
Surendra.

Last edited by nixcraft; 07-01-2009 at 05:11 PM. Reason: Added [code] tags
Reply With Quote
  #2 (permalink)  
Old 07-01-2009, 05:09 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Posts: 2,450
Thanks: 11
Thanked 189 Times in 139 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Postfix - Warn about bad directory/file ownership or permissions, and create missing directories
Code:
postfix check
Postfix - Enable verbose logging for debugging purposes
Code:
postfix -vv
OpenSSH SSHD server check for syntax error:
Code:
sshd -t
Lighttpd web server - check for syntax errors:
Code:
lighttpd -t  -f /etc/lighttpd/lighttpd.conf
nginx web server - check for syntax errors:
Code:
nginx -c /etc/nginx/nginx.conf -t
Apache show parsed settings for vhosts
Code:
 httpd -t -D DUMP_VHOSTS
FreeBSD / OpenBSD pf firewall syntax checking:
Code:
 pfctl -nf /etc/pf.conf
Check syntax error for TCPD (tcp wrapper config file)
Code:
tcpdchk
tcpdchk -v
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help

Last edited by nixcraft; 07-01-2009 at 05:17 PM.
Reply With Quote
The Following User Says Thank You to nixcraft For This Useful Post:
rockdalinux (07-02-2009)
  #3 (permalink)  
Old 07-01-2009, 05:39 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 334
Thanks: 12
Thanked 13 Times in 11 Posts
Rep Power: 4
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default

Thanks very much nixcraft

what about squid and sendmail?
any commands are there?
Reply With Quote
  #4 (permalink)  
Old 07-01-2009, 07:33 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Posts: 2,450
Thanks: 11
Thanked 189 Times in 139 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default Squid Check For Errors

For Squid proxy use:
Code:
squid -k check
squid -k parse
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
The Following User Says Thank You to nixcraft For This Useful Post:
rockdalinux (07-02-2009)
  #5 (permalink)  
Old 07-01-2009, 07:57 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 334
Thanks: 12
Thanked 13 Times in 11 Posts
Rep Power: 4
kumarat9pm has a spectacular aura about kumarat9pm has a spectacular aura about
Send a message via Yahoo to kumarat9pm Send a message via Skype™ to kumarat9pm
Default Thank you very much for your inputs

it helps me to troubleshoot more on servers
Reply With Quote
  #6 (permalink)  
Old 07-02-2009, 03:04 PM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
OS: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 643
Thanks: 10
Thanked 11 Times in 10 Posts
Rep Power: 9
rockdalinux is just really nice rockdalinux is just really nice rockdalinux is just really nice rockdalinux is just really nice rockdalinux is just really nice
Default

It is really sad that iptables lacks syntax checking option, nice list though...
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
Reply

Tags
syntax error , troubleshooting , troubleshooting linux servers , troubleshooting unix servers


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Query regd dns config files in /var/named location for RHEL 5 vaibhav.kanchan Domain Name Server 2 08-18-2008 01:44 PM
See what commands have been run on your Linux server sweta Getting started tutorials 5 04-30-2008 04:38 AM
imap errors / server slow down seed2be Mail Servers 0 03-06-2008 10:36 PM
Checking files exist seeker082 Shell scripting 6 02-22-2008 01:39 AM
checking windows file from linux jhn_daz@yahoo.com Getting started tutorials 1 10-31-2007 08:40 PM


All times are GMT +5.5. The time now is 02:58 PM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38