Monday, March 31, 2008

Samba for printing !!!

Step 1: Add smb to services
system-config-services
Add service "smb"
Check auto start, and start service

Step 2: Open port in firewall
system-config-securitylevel
Check Trusted services "Samba"

Step 3: Configure samba service
vi /etc/samba/smb.conf

[global]
workgroup =
server string = Samba Server Version %v
passdb backend = tdbsam
printcap name = cups
printing = cups
cups options = raw

[homes]
comment = Home Directories
read only = No
browseable = No

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
lpq command = lpq -P%p
lprm command = lprm -P%p %j
use client driver = Yes
browseable = No

Step 4: Add users
use smbpasswd -a to add user to samba

More info:
http://www.samba.org/samba/docs/Samba-HOWTO-Collection.pdf
http://www.samba.org/samba/docs/Samba-Guide.pdf
http://www.linuxquestions.org/questions/linux-networking-3/samba-client-access-denied-unable-to-connect-122851/

Saturday, March 29, 2008

My favorite vi settings

Add the following lines to .exrc your $HOME folder

set autoindent
set backspace=indent,eol,start
set tabstop=4
set expandtab
set shiftwidth=4
set shiftround
syntax on
set nobackup
set nowritebackup
set number

Now vi looks and feels nice.

Subversion server setup

Installing subversion server on Linux (Centos/Redhat)

Step 0. Install svn
yum install svn

Step 1: Create repository
svnadmin create

Step 2: For User Id and password: Edit /conf/svnserve.conf
and /conf/passwd
svnserve.conf:
anon-access = none
auth-access = write
password-db = passwd

Step 3: Copy "svnd" into /etc/init.d/ and
chmod 755 svnd

Step 4: Edit svnd :
Line 28: daemon $SVND -d -r

Step 5: Open port in "/etc/sysconfig/iptables" add
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 3690 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m udp -p udp --dport 3690 -j ACCEPT

Step 6: Make sure /etc/services has the following entries
svn 3690/tcp # Subversion
svn 3690/udp # Subversion

Step 7: start/restart firewall and svnserve
/etc/init.d/iptables restart
/etc/init.d/svnd restart

Done...