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 ...


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 01-07-2009, 03:58 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 447
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about 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; 01-07-2009 at 04:11 PM. Reason: Added [code] tags
Reply With Quote
  #2 (permalink)  
Old 01-07-2009, 04:09 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 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; 01-07-2009 at 04:17 PM.
Reply With Quote
The Following User Says Thank You to nixcraft For This Useful Post:
rockdalinux (02-07-2009)
  #3 (permalink)  
Old 01-07-2009, 04:39 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 447
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about 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 01-07-2009, 06:33 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,710
Thanks: 11
Thanked 245 Times in 184 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 (02-07-2009)
  #5 (permalink)  
Old 01-07-2009, 06:57 PM
kumarat9pm's Avatar
Senior Member
User
 
Join Date: Jun 2007
Location: Pune,MH,India
OS: RHEL,UBUNTU..
Posts: 447
Thanks: 20
Thanked 20 Times in 18 Posts
Rep Power: 5
kumarat9pm has a spectacular aura about 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 02-07-2009, 02:04 PM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

It is really sad that iptables lacks syntax checking option, nice list though...
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
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 18-08-2008 12:44 PM
See what commands have been run on your Linux server sweta Getting started tutorials 5 30-04-2008 03:38 AM
imap errors / server slow down seed2be Mail Servers 0 06-03-2008 09:36 PM
Checking files exist seeker082 Shell scripting 6 22-02-2008 12:39 AM
checking windows file from linux jhn_daz@yahoo.com Getting started tutorials 1 31-10-2007 07:40 PM


All times are GMT +5.5. The time now is 12:55 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 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