Simple Samba Shares in Debian
Here, we would like to quickly explain how you can create a simple Samba share on a Debian-based system.
However, please note that we will not look at user permissions in detail here.
ALL USERS will have access to the share created, and can read, write and even delete.
| Please note that this article / this category refers either on
older software / hardware components or is no longer maintained for
other reasons. This page is no longer updated and is purely for reference purposes still here in the archive available. |
|---|
ALL USERS will have access to the share created, and can read, write and even delete.
Contents
Samba Installation
We install Samba with the following command:apt-get install sambaAny dependencies will be determined by the system. Please install them as well.
Backing up the Configuration File
A default configuration file will be created under/etc/samba/smb.confIt would be best to back this file up, because the file is well commented and may be useful to you, if you want to review something.
mv /etc/samba/smb.conf /etc/samba/smb.bak
Creating a New Configuration File
We will now create a new smb.conf file and create a simple share without any authentication, which provides access to everyone.nano /etc/samba/smb.confEnter the following configuration there:
[global] workgroup = smb security = share share modes = yes [homes] comment = Home Directories browsable = no read only = no create mode = 0750 [public] path = /media/storage/ public = yes writable = yes comment = smb share printable = no guest ok = yesWith this configuration, you will get a share named
publicwhich accesses a partition that has been mounted under:
/media/storagePlease note that the /media/storage mount point must be given the 777 rights, so that everyone can write to it.
chmod 777 /media/storage
Re-starting the Samba Service
To load this configuration, you will have to re-start Samba. The command for this is/etc/init.d/samba restartAll users should now have access to the created share.
Starting with Ubuntu 10.10 and for all other up-to-date Debian based Linux distributions, the package cifs-utils should be installed instead of smbfs.
apt-get install cifs-utilsAfterwards, the share can be mounted directly from the client:
mount -t cifs //FILE-SERVER-IP-ADDRESS/public /local/mountpoint -o user=nobodyYou will be asked for a password. Confirm the password by pressing the Enter key. The share should now be mounted and ready for reading and writing.
Right-click on My Computer and select "Map Network Drive".
Enter the IP address and the name of the share:
\\IP-DES-REMOTE-SERVERS\publicThe network drive should now be connected.

Nenhum comentário:
Postar um comentário