Sharing files in ArchLinux using Samba

Posted: January 4, 2012 in Linux
Tags: , ,

Use network manager to assign static ip/subnet on server/client – server/client of course must be on same subnet (assumes crossover cable connection between server/client – otherwise network the client/server as needed).

Do following on server

$pacman -S samba – this installs samba server software

$cp /etc/samba/smb.conf.default /etc/samba/smb.conf – this creates default smb.conf file required by samba

$smbpasswd -a <user name> – this creates a samba password for an already existing server user

Add following two lines in to /etc/samba/smb.conf then change browseable = yes under [homes]

netbios name = archsmb
encrypt passwords = yes

[homes]
browseable = yes
writable = yes

$/etc/rc.d/samba start – this starts the samba daemon/service on the server

Do following on client

$pacman -S smbclient – this installs smbclient client software to connect to server. N.B. smbclient works exactly like an ftp client

$smbclient -L <server IP address> -U <samba server user name> – this shows list of shares on server

$smbclient //<server IP address>/<share> -U <samba server user name> – this actually connects to the share

e.g. $smbclient //<server IP address>/homes -U <samba server user name> – this connects to [homes] share defined on server smb.conf

Then type help in smbclient to show list of commands to use

Credits to: Instructions above adapted from following and Archwiki.

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 )

Google+ photo

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

Connecting to %s