Samba is a Client/Server application which communicate the Windows and Unix Sharing Systems. Basically is a Linux implementation for the Windows networking protocols.
Its name is from SMB (Server Message Block), is a messaging interchange protocol for the above targets. But it implemnts much more which appears in the Windows Network scene as: NetBIOS, RPC, SMB (renamed to CIFS), WINS, passwords data base (SAM), Active Directory, LDAP,….
Withe the client, smbclient, Linux could acceed to the Windows recurses, and with server part in Linux Server, our Wondows systems could acceed to Linux recourses.
Origin | http://www.samba.org/ |
Package | apt 3.0.24 |
Documentation (english) | http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/ |
Files | Configuration: /etc/samba/smb.confLog: /var/log/samba/ |
Installing with apt:
elite:~# apt-get install samba samba-common smbclient libcupsys2 smbfs Leyendo lista de paquetes... Hecho Creando árbol de dependencias... Hecho Paquetes sugeridos: cupsys-common Paquetes recomendados smbldap-tools Se instalarán los siguientes paquetes NUEVOS: libcupsys2 samba samba-common smbclient smbfs 0 actualizados, 5 se instalarán, 0 para eliminar y 1 no actualizados. Se necesita descargar 413kB/10,1MB de archivos. Se utilizarán 24,8MB de espacio de disco adicional después de desempaquetar.
My objective is, from my Windows Desktop, see as a network unit my web root (/var/www). Then I may to do two things:
- Ask the Amba server to share in my LAN the /var/www/ directory
- Only access allow to my XP user: my_user/password.
Then add the user to samba:
elite:~# adduser my_user
elite:~# smbpasswd -a my_user New SMB password: Retype new SMB password: Added user my_user.
We will add our user to the web users group, add writing permissions to the web group (warning: the system permissions prevail over samba permissions), and make file owner to our web user:
elite:~# usermod -g www-data my_user elite:~# chmod -R g+w /var/www/ elite:~# chown -R www-data:www-data /var/www
Finally, configure Samba /etc/samba/smb.conf, for show our recurse as \elitewww:
[www] comment = Directorio del web valid users = my_user write list = my_user path = /var/www allow hosts = 192.168.100.5
More insurance only can access my windows user and from my Desktop IP.
An last, I use webmin for Samba administering, but is possible using SWAT, web administration tool developed for samba administration.