Linux Command Syntax Reference Guide | Free Download Links

Monday, February 9, 2009

Sendmail Files & Commands

sendmail.cf
sendmail.mc

“sendmail.cf” is the configuration file. “sendmail.mc” is a macro file which can be used to generate “sendmail.cf” by: m4 sendmail.mc > sendmail.cf

aliases
mail aliases, must run “newaliases” after change. use :include: to include external list in a file.

.forward
per user aliases, use \yourname to prevent further expand and keeps a copy in mailbox.

access
mail access control, FEATURE(access_db) should be set in sendmail.mc. For example, in /etc/mail/access
cyberpromo.com REJECT
mydomain.com RELAY
spam@somewhere.com DISCARD
makemap hash /etc/mail/access < /etc/mail/access

/etc/mail/relaydomains

list all host/domain accepted for relaying.


COMMANDS

newaliases
rebuild the data base for the mail aliases file.

makemap
build access database, e.g, makemap hash access.db

Printer Configuration Files

/etc/printcap
/etc/printcap.local

Printer capabilities data base.

/etc/lpd.conf
LPRng configuration file.

/etc/lpd.perms

permissions control file for the LPRng line printer spooler

/etc/hosts.lpd

Access control (BSD lpd).

/etc/hosts.equiv
trusted hosts.

PRINTER

Environment variable of default printer.

/dev/lp0

parallel port.


Commands
---------------


lpc, lpq, lprm
line printer control program, print queue maintain

NFS File Sharing Commands

mount
mount a file system or all entries in fstab.

exportfs
export file system listed in exports

showmount –e hostname
show file systems exported

NFS File Sharing files

/etc/fstab
file systems mounted during boot.

/etc/exports

NFS server export list.

/etc/auto.master
auto mount master file.

Files in /etc/sysconfig

Configuration Files
--------------------------

keyboard
keyboard map,
e.g., KEYBOARD=”/usr/lib/kdb/keytables/us.map”

mouse

Mouse type,
e.g., MOUSETYPE=Microsoft
XEMU3=yes

network

network settings, contains NETWORKING=yes

Network Configuration Commands

netconfig
menu driven Ethernet setup program.

pppsetup
setup PPP connection (Slackware).

ifconfig
setup Ethernet during boot,
for example:
/sbin/ifconfig eth0 ${IPADDR} broadcast
${BROADCAST} netmask ${NETMASK}
/sbin/route add -net ${NETWORK} netmask
${NETMASK} eth0
/sbin/route add default gw ${GATEWAY} netmask
0.0.0.0 metric 1

host

lookup host name or IP (similar to nslookup).

dnsdomainname
show DNS domain name.

arping; arp

find out Ethernet address by first arping then arp.

ipchains

firewall and NAT (/etc/sysconfig/ipchains on Redhat)

iptables

firewall and NAT (/etc/sysconfig/iptables on Redhat)

ntsysv

menu driven SYSV service configuration (Redhat)

chkconfig

command line SYSV service configuration (Redhat)

Sunday, February 8, 2009

Network Configuration Files

IP address, Network mask, Default gateway are in these files. May edit manually to
modify network parameters.
  • /etc/rc.d/rc.inet1
  • (Slackware)
  • /etc/sysconfig/neworkscripts/
  • ifcfg-eth0 (Redhat)

hostname is set by “/bin/hostname” during boot and the name is read from these files.
  • /etc/HOSTNAME
  • /etc/NETWORKING
  • (Slackware)

May change manually.
  • /etc/sysconfig/network (Redhat)

specify name server, DNS domain and search order.
For Example: search la.asu.edu
nameserver 129.219.17.200
  • etc/resolv.conf

host name to IP mapping file.host name information look up order.
Example: order hosts, bind multi on
  • /etc/hosts
  • /etc/host.conf

new way to specify information source.
  • /etc/nsswitch.conf

TCP/IP services and ports mapping.
  • /etc/networks
  • /etc/protocols
  • /etc/services

RPC service name to their program numbers mapping.
  • /etc/rpc

User Manipulation Commands Syntax

adduser
script to create an new user interactively (slackware) or link to useradd (Redhat).

useradd, userdel, usermod
create, delete, modify an new user or update default new user information..

newusers
update and create new users (batch mode).

groupadd, groupdel, groupmod

add, delete or modify group.

chage. chfn, chsh

modify account policy (password length, expire data etc.) or finger information (full
name, phone number etc.) change default login shell.

linux init=/bin/sh rw

gain root access during boot prompt without password, can be used to fix some problems.
mount –w -n –o remount /

makebootdisk

make a bootable floppy disk

User Management Files

User Management Files

1.User account information
  • /etc/group
  • /etc/passwd
  • /etc/shadow
2.BASH system wide and per user init files.
  • /etc/bashrc
  • /etc/profile
  • $HOME/.bashrc
  • $HOME/.bash_profile
3.TCSH system wide and per user init files.
  • /etc/csh.cshrc
  • /etc/csh.login
  • $HOME/.cshrc
  • $HOME/.tcshrc
  • $HOME/.login
4.Template files for new users.
  • /etc/skel

5.Default for certain commands.
  • /etc/default
6.Redhat and Slackware version info
  • /etc/redhat-release
  • /etc/slackware-version

Followers