Samba Setup
Installation
and Setup:
First install the following:
apt-get install samba-common smbclient samba-common-bin smbclient cifs-utils
Next, authorize users to access samba shares:
sudo smbpasswd -a
Make a safe backup copy of the original smb.conf file.
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bkup
Edit the file "/etc/samba/smb.conf"
First install the following:
apt-get install samba-common smbclient samba-common-bin smbclient cifs-utils
Next, authorize users to access samba shares:
sudo smbpasswd -a
Make a safe backup copy of the original smb.conf file.
sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bkup
Edit the file "/etc/samba/smb.conf"
sudo
nano /etc/samba/smb.conf
Add this to the end of the file:
Add this to the end of the file:
[folder_name]
path
= /home/user_name>/folder_name
valid
users =
read
only = no
Restart samba:
sudo service smbd restart
Use this command to check your smb.conf for any syntax errors.
testparm
Determine the LAN address of the computer:
sudo ifconfig
List all shares:
Restart samba:
sudo service smbd restart
Use this command to check your smb.conf for any syntax errors.
testparm
Determine the LAN address of the computer:
sudo ifconfig
List all shares:
smbclient
-L /// -U
Connect:
smbclient
/// -U
Mounting Local Shares:
smbclient -L XXX.XXX.X.X -U username
Then, create a local directory and mount the remote share:
mkdir /mnt/abc mount -t cifs //server/share /mnt/abc
Depending on the access you give to your windows share are the credentials required: if you give your share 'Everyone' read (and write) access nothing else is required, otherwise you must add credentials at mount time:
mount -t cifs //server/share /mnt/abc -o user=user,pass=password,dom=domain
When finished just dismount the share:
umount /mnt/abc
Mounting Local Shares:
smbclient -L XXX.XXX.X.X -U username
Then, create a local directory and mount the remote share:
mkdir /mnt/abc mount -t cifs //server/share /mnt/abc
Depending on the access you give to your windows share are the credentials required: if you give your share 'Everyone' read (and write) access nothing else is required, otherwise you must add credentials at mount time:
mount -t cifs //server/share /mnt/abc -o user=user,pass=password,dom=domain
When finished just dismount the share:
umount /mnt/abc
Comments