Install and Configure Samba for Network Printing

14 12 2009

1. Backup Currently Running IP Configuration File
cp /etc/network/interfaces /home/sugizo/bkup/interfaces.ori

2. Edit IP Address Configuration File
sudo vim /etc/network/interfaces

auto eth0
iface eth0 inet static
address         192.168.44.3
netmask         255.255.255.0
gateway         192.168.44.2
network         192.168.44.0
broadcast       192.168.44.255

auto eth1
iface eth1 inet static
address         18.18.18.3
netmask         255.255.255.0
gateway         192.162.44.2
network         18.18.18.0
broadcast       18.18.18.255

auto eth2
iface eth2 inet static
address         88.88.88.3
netmask         255.255.255.0
gateway         192.168.44.2
network         88.88.88.0
broadcast       88.88.88.255

3. Backup Currently Hostname File Configuration
cp /etc/hostname /home/sugizo/bkup/hostname.ori

4. Edit Hostname File Configuration
sudo vim /etc/hostname

karmic.ubuntu64.vmw

5. Backup Currently Host Addresses Configuration
cp /etc/hosts /home/sugizo/bkup/hosts.ori

6. Change Host Addresses Configuration
sudo vim /etc/hosts

127.0.0.1       localhost
127.0.1.1       karmic.ubuntu64.vmw     karmic
192.168.44.3    karmic.ubuntu64.vmw     karmic
18.18.18.3    karmic.ubuntu64.vmw     karmic
88.88.88.3    karmic.ubuntu64.vmw     karmic

7. Reboot the Machine
sudo reboot

8. Update List Packages
sudo apt-get update

9. Install Extended Internet Service, Samba Web Administration Tool (SWAT), Samba Client Server, Apache Web Server, CUPS
sudo apt-get install xinetd swat samba samba-doc smbclient apache2 cupsys*

10. Backup Currently Samba File Configuration
cp /etc/samba/smb.conf /home/sugizo/bkup/smb.conf.ori

11. Edit Samba File Configuration
sudo vim /etc/samba/smb.conf

load printers = yes
printing = cups
printcap name = cups

[printers]
comment = All Printers
browseable = yes
path = /var/spool/samba
printable = yes
guest ok = yes
read only = no
create mask = 0700
public = yes
print command = sudo /usr/bin/lpr -P%p -r %s

12. Create Samba Root Password
sudo smbpasswd -a root

13. Add Samba User (Change User With Your Own Name)
sudo useradd -m -G user

14. Check Inetd Configuration File (Ensure SWAT Service is On)
sudo vim /etc/inetd.conf

swat            stream  tcp     nowait.400      root    /usr/sbin/tcpd  /usr/sbin/swat

15. Create SWAT Extended Internet Service
sudo vim /etc/xinetd.d/swat

service swat
{
port = 901
socket_type = stream
wait = no
user = root
server = sudo /usr/sbin/swat
log_on_failure += USERID
disable = no
}

16. Restart Samba, Apache, Extended Internet Service
sudo service samba restart
sudo service apache2 restart
sudo service xinetd restart

17. Test Samba Server
sudo smbclient -L localhost -U%

Advertisement

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s




Follow

Get every new post delivered to your Inbox.