Permitiendo el acceso desde equipos windows con usuario y contraseña.
1) Instalamos paquetes necesarios:
#aptitude install samba samba-common samba-client
Nos pedira el workgroup
antivar WINS con DHCP: no
y ejecutará los demonios samba: smbd y nmbd
2) Creamos usuario, su password y directorio a compartir, .
#useradd samba
#smbpasswd -a samba
#mkdir /home/samba
3) Editamos el archivo de configuración samba:
#nano /etc/samba/smb.conf
[SAMBA]
path=/home/samba
browseable=yes
writeable=yes
valid user = samba
4) Reinicio del servdor samba:
/etc/init.d/samba restart
5) Para comprobar si todo está correcto:
# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[SAMBA]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
server string = %h server
obey pam restrictions = Yes
passdb backend = tdbsam
pam password change = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
unix password sync = Yes
syslog = 0
log file = /var/log/samba/log.%m
max log size = 1000
dns proxy = No
panic action = /usr/share/samba/panic-action %d
[homes]
comment = Home Directories
valid users = %S
create mask = 0700
directory mask = 0700
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
printable = Yes
browseable = No
[print$]
comment = Printer Drivers
path = /var/lib/samba/printers
[SAMBA]
path = /home/samba
valid users = samba
read only = No
5) smbclient -L localhost
y a probar desde un equipo windows.
6) webografia:
http://www.debianadmin.com/file-server-configuration-in-debian-using-samba.html
No hay comentarios:
Publicar un comentario