You are on page 1of 3

Ex.No.

12 10/10/12

INSTALLING VARIOUS SOFTWARE PACKAGES

________________________________________________________________________________________________ 1.Objective: To install samba and share files to windows and also install Common Unix Printing System (CUPS) a)To perform the following using SAMBA: 1.Share a folder that is present in the windows machine from the linux machine. 2. Share a folder that is present in the linux machine from the windows machine. b)To perform the following using CUPS: 1.Make the printer attached to the Linux server sharable to the Linux client using CUPS. 2. Make the printer attached to the Linux server sharable to the Windows XP client using CUPS. 2.Description : SAMBA: Samba allows the linux systems to share files and printers across a network connection.By using its SMB protocol,your linux box can appear in Windows Network Neighbourhood or My Network Places just like any other windows machine. INSTALLING SAMBA: $yum install samba Smb.conf file All of samba is configured in one single file,the smb.conf file. This file is located at /etc/samba/smb.conf.It allows you to specify which resources on the linux machine you wish to share and who they can be accessed by.

SAMBA USERS: Create the smbpasswd file that was specified in the smb.conf file. Create it based on the existing /etc/passwd file. $cat /etc/passwd/mksmbpasswd.sh > /etc/samba/smbpasswd chased 600 this file(/etc/samba/smbpasswd) so that only root has read abd write permissions. Use the following command to set each samba users password: Smbpasswd username Running samba on a Linux machine: To start,stop/restart samba: /etc/init.d/smd start /etc/init.d/smd stop /etc/init.d/smd restart

SAMBA LINUX TO WINDOW SHARING: Setup the share in /etc/samba/smb.conf as follows: Comment=music fro linux boxen Path=/var/stuff/media/musak Read only=Yes On the windows machine access it as \\192.168.0.1\musak when 192.168.0.1 is the IP address of the linux machine.

SAMBA WINDOWS TO LINUX SHARING: ->First,turn on file sharing Go to Start->setting->Control Panel Open Network In the first tab called Configuration click on File and Print Sharing On the dialog box that comes up check I want to be able to give others access to my files. ->Now goto the file explorer and right click on the folder you want to share and from the menu that pops up select sharing... and from the Manual Properties Dialog Box that comes up,select the second tab Sharing... and select Shared as which will enable all the text box Full or Depends on Password and enter a password.

-> Find out the host name on windows machine (In the previous step,let the share name be MYSHARE) Goto Start->Setting->Control Panel Open Network In the second tab Identification note the Computer Name Let it be MYWINBOX ->Now go to the linux window Create mount point for the share $mkdir /mnt/winstuff Mount the shared named MYSHARE on windows host named MYWINBOX $submount \\MYWINBOX\MYSHARE /mnt/winstuff This will prompt you for the password for the share, enter the password and after that if you go to /mnt/winstuff you can access all files on the windows folder.

CUPS: (COMMON UNIX PRINTING SYSTEM) CUPS is a modular printing system for Unix-like computer operating systems which allows a computer to act as a print server. A computer running CUPS is a host that can accept print jobs from client computers, process them and send them to the appropriate printer. CUPS consists of a print spooler and scheduler, a filter system that converts the print data to a format that the printer will understand and a backend system that sends this data to the print device. INSTALLATION PACKAGES: *CUPS: core of the system *system-config-printer: gui config tool *kdebase: provides KDE gui config utility $yum install cups system-config-network kdebase CONFIGURATION: Bulk of CUPS configuration can be done from user friendly graphical interface. Three options are available *web based config utility *system-config-printer: user friendly graphical utility *kprinter: accessible from settings>printer in KDE SHARING PRINTER: SHARING WITH OTHER LINUX MACHINES: publish printer button at localhost:631 does the job. SHARING WITH WINDOWS XP CLIENT: In addition to be published, to enable other MS computers to print to your CUPS shared printer, ct needs to be shared through SAMBA.

3.Procedure: CUPS 1. Check for existence of CUPS $rpm qa | grep cups $rpm qi cups 2. Check if CUPS is running #service cups status 3. Open firefox and type the following #open firefox http://localhost:631/ under CUPS for administrators select Adding Printers and Classes 4. Under Printers select Add Printer and give username and password Username : root Passwd: admin123 5. Under Add Printer select Printer and click on continue 6. Give the connection as http://localhost:631/ipp/ and click on continue 7. Give a name for the printer, description and location and click on continue. 8. Select the make as HP and click on continue. 9. Select the model and click on Add Printer 10.After printer is added change the page size appropriately and click on set default properties 11.In the next page click on selected printer name.

12.Select print test page from Maintenance 13.Click on show all jobs. SAMBA I Stage 1 (Linux) 1. Check if SAMBA is installed and working $rpm qa | grep cups $su #service smb status #service smb start (if samba was in stopped state) #service smb status 2. Check if network message block is running #service nmb status #service nmb start (if samba was in stopped state) #service nmb status 3. View the ip table #iptables L 4. Stop the iptables service #service iptables stop 5. View the ipv6 table #ip6tables L 6. Stop the iptables service #service ip6tables stop 7. Check enforce status #getenforce #setenforce (to enable enforce) #setenforce 0 8. Add winuser and set samba password for the winuser #useradd winuser #smbpasswd a winuser #service smb status # service nmb status II Stage 2 (Windows): 1. Go to run and type the ip of your linux box \\192.168.1.43 (for example) 2. Give the password which you assigned to winuser in linux 3. Create some folders in the linux login III Stage 3 (Linux): 1. Login as winuser 2. Go to places ->home folder and check if the folders created in windows is available IV Stage 4 (Linux) 1. Login open source lab 2. Go to places->home folder 3. Press CTRL+L and type smb://192.168.1.252 (ip address of the windows machine) 4. Login as administrator 5. Create some folders and try viewing in linux box. 3.Conclusion: In fedora environment, the installation procedure for SAMBA and CUPS is studied , implemented and the resources were shared among the linux machines and also between a linum machine and Windows XP.

You might also like