Windows File Sharing and Printer Sharing with SAMBA: Difference between revisions

From ITCwiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 66: Line 66:


References:
References:
http://www.n00bsonubuntu.net/content/install-samba-and-share-folders-ubuntu-1010-maverick-meerkat


http://www.liberiangeek.net/2010/05/share-filesfolders-between-windows-xp-vista-7-and-ubuntu-10-04-lucid-lynx-via-samba/
http://www.liberiangeek.net/2010/05/share-filesfolders-between-windows-xp-vista-7-and-ubuntu-10-04-lucid-lynx-via-samba/

Revision as of 05:24, 17 December 2010

Windows File Sharing and Printer Sharing with SAMBA


Samba provides file and print services for various Microsoft Windows clients and can integrate with a Windows Server domain, either as a Primary Domain Controller (PDC) or as a domain member. It can also be part of an Active Directory domain. Samba runs on most Unix and Unix-like systems, such as Linux, Solaris, AIX and the BSD variants, including Apple's Mac OS X Server.

How to use Linux to share your printer and windows file shares:


GUI version:

Start by logging into Ubuntu and go to Applications –> Ubuntu Software Center.

Then search for and install ‘Samba’ (This will install the Samba GUI)

After installing, go to System —> Administration –> Samba.

Select ‘Preferences –> Server Settings’ Then type the Workgroup Name to match your Windows Workgroup Name and click OK.

After that, select ‘Preferences –> Samba Users’ Click Add User, then select the User account from the drop-down list and add the Windows Username and Samba Password. (Samba Username and Password can be Ubuntu password)

When you’re done, click ‘File –> Add Share’ or the green + icon then type/browse the directory (folder) you wish to share. Also enter the ‘Share name’, then select ‘Writable and Visible’. Select the ‘Access’ tab, then choose the user you want to access the shares, then click OK.

Restart both computers and you should be able to view shares from both computers.


Command Line version:

First open a command prompt and elevate your privileges. You can use sudo bash or su followed by your corresponding password.

Next enter the commands shown: aptitude install samba (This will install the core program; follow the default prompts)

Create a Samba password for yourself with the command (substitute USERNAME for your own name): smbpasswd -a USERNAME

Create or locate a folder you want to share, then edit the Samba configuration file with the command: gedit /etc/samba/smb.conf

Once smb.conf has loaded, add this to the very end of the file (note! Test is the name of the folder to be shared):

[test]

path = /home/USERNAME/test

available = yes

valid users = USERNAME

read only = no

browsable = yes

public = yes

writable = yes

(There should be no spaces between the lines, and note also that there should be a single space both before and after each of the equal signs.)

Restart the machine. And you are done.


References:

http://www.liberiangeek.net/2010/05/share-filesfolders-between-windows-xp-vista-7-and-ubuntu-10-04-lucid-lynx-via-samba/

http://ubuntuforums.org/showthread.php?t=1502265

http://attackcomputerwiz.blogspot.com/2010/06/connecting-ubuntu-1004-to-windows-7.html

http://www.jonathanmoeller.com/screed/?p=1590

http://www.unixmen.com/linux-tutorials/566-install-samba-server-in-ubuntu-karmic

http://en.wikipedia.org/wiki/Samba_(software)