![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2004
Location: Rochester, NY
Beans: 39
|
HOW TO: Setup Samba Over A Linux Network.
hey guys, I wanted to share a folder on my laptop with my desktop (both linux) how do I do it?
|
|
|
|
|
|
#2 |
|
Ultimate Coffee Grinder
![]() Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
|
Re: how do I set up linux network shares?
the most typical way is by configuring a program called samba. It's a Windows File Sharing server/client for Linux. There are plenty of guides on Google about how to do this.
I recommend that you use SSH. Though technically not a file sharing protocol, it's easy to set up, plus very simple to extend over a larger network. It's the best solution when both systems run Linux. Plus, traffic is encrypted, giving you an extra sense of security, especially if there's untrusted people on your network (or you're going through the internet!) First, use apt-get install ssh to install the SSH server. Do this on both systems. Open up a file browser (using any folder on the Computer menu). Go to File, select Connect to Server. Choose SSH as the protocol, fill in appropriate login names and such. |
|
|
|
|
|
#3 |
|
Extra Foam Sugar Free Ubuntu
![]() |
Re: how do I set up linux network shares?
I wouldn't agree with SSH to share files. Thats not the way you would want to go. I would reccomend installing samba / swat. (SWAT is optional)
First lets begin by setting up SAMBA! Installing... Code:
sudo apt-get install samba We will be creating a whole new samba config because we are the guru's and it improves validity. 1. Rename /etc/smb.conf to /etc/smb.conf.old 2. Open /etc/smb.conf with your favorite text editor! Code:
; /etc/smb.conf ; ; Make sure and restart the server after making changes to this file, ex: ; /etc/rc.d/init.d/smb stop ; /etc/rc.d/init.d/smb start [global] ; Uncomment this if you want a guest account ; guest account = nobody log file = /var/log/samba-log.%m lock directory = /var/lock/samba share modes = yes [homes] comment = Home Directories browseable = no read only = no create mode = 0750 [tmp] comment = Temporary file space path = /tmp read only = no public = yes Code:
"interfaces = 192.168.1.1/24" To share a directory with the public, create a clone of the [tmp] section above by adding something like this to smb.conf: Code:
[public] comment = Public Stuff path = /home/public public = yes writable = yes printable = no Code:
[public] comment = Public Stuff path = /home/public public = yes writable = yes printable = no write list = @ubuntu In the [global] section of /etc/smb.conf, add the following lines: Code:
encrypt passwords = yes smb passwd file = /etc/smbpasswd This should be all, save and exit. Starting SMB Daemons Code:
sudo /usr/sbin/smbd -D && /usr/sbin/nmbd -D To see which shares are available on a given host, run: Code:
/usr/bin/smbclient -L host Example: /usr/bin/smbclient -L fleixius To view the shared folder 'public' on machine 'fleixius' (//fleixius/public) you will need to: Code:
/usr/bin/smbclient service <password> Example: /usr/bin/smbclient ////fleixius/public mypwd Now once your in the 'smb: \' console. You can type 'h' for a help menu. Mounting a Shared Drive Using the examples above, lets say we want to mount a folder called "Ubuntu" shared on "fleixius" to a directory of "/home/Ubuntu" on the local box. The typical mount command would be as following: Code:
smbmount "\\\\fleixius\\Ubuntu" -U rtg2t -c 'mount /home/Ubuntu -u 1000 -g 1000' I hope this helps and solves the problems with samba. Please send feedback! |
|
|
|
|
|
#4 |
|
Just Give Me the Beans!
![]() Join Date: Oct 2004
Location: Rochester, NY
Beans: 39
|
Re: how do I set up linux network shares?
k I followed the guide as written but I get this error
vulcanon@Vulcari:/etc/samba $ sudo /usr/bin/smbclient -L Vulcari Password: session setup failed: NT_STATUS_LOGON_FAILURE gave the correct password too Last edited by Vulc; October 28th, 2004 at 12:22 AM.. |
|
|
|
|
|
#5 |
|
5 Cups of Ubuntu
![]() |
Re: HOW TO: Setup Samba Over A Linux Network.
Why use samba in a pure linux relation?
If you don't need user auth, NFS is the solution. It's much easyer than samba and you don't get the overhead as with SSH filetransfer. Server: http://nfs.sourceforge.net/nfs-howto/server.html Client: http://nfs.sourceforge.net/nfs-howto/client.html Regards Stian H. Larssen |
|
|
|
|
|
#6 | |
|
5 Cups of Ubuntu
![]() |
Re: how do I set up linux network shares?
Quote:
Did you add the samba password on the server for the correct user? smbpasswd |
|
|
|
|
|
|
#8 |
|
Ubuntu Extra Shot
![]() Join Date: Oct 2004
Location: Paradise Island, Bahamas
Beans: 359
Ubuntu 9.04 Jaunty Jackalope
|
Re: HOW TO: Setup Samba Over A Linux Network.
I recommend "nfs" for share folders between native linux machines. Samba works great for Linux to windows. The "nfs" sharers must edit the "/etc/exports" file and the Share-e must mount the drive as defined in the "sharers" export file. You'll need to install "nfs" file utilities on each Linux machine too!
If your UID is the same on both machines, you can read/write with no problem. In a multi-user environment you may not want everyone to be the same UID number (1000). In that case every user would be set to a different UID (1000, 1001, ...) on his machine and on the server side; in other words, a master list of username to UID would be used throughout the network. Every user would have a unique UID. I used to try and use SAMBA for both Linux and Windows machines, but there are too many "gottchas" with the "rights" thing with Samba and a Linux client. I spent too much time "trying" to force SAMBA on linux when "nfs" just works!
__________________
linxos.com hllug.org bubbasgeek.com 100% Linux/BSD @Home: Ubuntu -hp6810,Desktop,Server,MythTV. Fedora -MythTV, i9300. M0n0WALL -fw/router. Last edited by emperor; October 28th, 2004 at 01:08 PM.. |
|
|
|
|
|
#9 |
|
Ultimate Coffee Grinder
![]() Join Date: Oct 2004
Location: Cambridge. MA
Beans: 5,063
Ubuntu 8.10 Intrepid Ibex
|
Re: HOW TO: Setup Samba Over A Linux Network.
Funny thing; I've never had issues with Linux-to-Linux SAMBA. Especially with cifs, which supports POSIX extensions on top of smbfs! YAY
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|