MachángaraSoft

lunes, 10 de agosto de 2009

Acceder desde Linux a Windows en forma segura con Samba

Instalación del servidor de archivos 'samba'

henry@henry-desktop:~/Documents/uoc/linux/final$ sudo apt-get install samba samba-client smbfs smbclient
[sudo] password for henry:
Reading package lists... Done
Building dependency tree
Reading state inform
ation... Done
Note, selecting smbclient instead of samba-client
smbclient is already the newest version.
smbclient is already the newest versio
n.
Suggested packages:
openbsd-inetd inet-superserver smbldap-tools ldb-tools keyutils
The following NEW packages will be installed:
samba smbfs
0 upgraded, 2 newly insta
lled, 0 to remove and 40 not upgraded.
Need to get 6048kB of archives.
After this operation, 17.4MB of additional disk space will be used.
Get:1 http://ubuntu.media.mit.edu jaunty/main s
amba 2:3.3.2-1ubuntu3 [4527kB]
Get:2 http://ubuntu.media.mit.edu jaunty/main smbfs 2:3.3.2-1ubuntu3 [1520kB]
Fetched 6048kB in 20s (300kB/s)
Preconfiguring packages ...
Selecting previously deselected package samba.
(Reading database ... 106272 files and directories currently installed.)
Unpacking samba (from .../samb
a_2%3a3.3.2-1ubuntu3_i386.deb) ...
Selecting previously deselected packa
ge smbfs.
Unpacking smbfs (from .../smbfs_2%3a3.3.2-1ubuntu3_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for ufw ...
Setting up samba (2:3.
3.2-1ubuntu3) ...
Generating /etc/
default/samba...
tdbsam_open: Converting version 0 database to version 4.
account_policy_get: tdb_fetch_uint32 failed for field 1 (min password length), returning 0
account_policy_get: tdb_fetch_uint32 fa
iled for field 2 (password history), returning 0
account_policy_get: tdb_fetch_
uint32 failed for field 3 (user must logon to change password), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 4 (maximum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 5 (minimum password age), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 6 (lockout duration), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 7 (reset count minutes), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 8 (bad lockout attempt), returning 0
account_policy_get: tdb_fetch_uint32 failed for field 9 (disconnect time), returning 0
account_policy_get: tdb_fetch_uint32
failed for field 10 (refuse machine password change), returning 0
Importing account for nobody...ok
Importing account for henry...ok
* Starting Samba
daemons [ OK ]

Setting up smbfs (2:3.3.2-1ubuntu3) ...

Configuración, se descomenta la linea 'security = user' , y se añade otra linea 'username map = /etc/samba/smb/smbusers''











Reiniciar y generar password para el usuario

henry@henry-desktop:/etc/samba$ sudo /etc/init.d/samba restart
[sudo] password for henry:
* Stopping Samba daemons [ OK ]

* Starting Samba daemons [ OK ]
henry@henry-desktop:/etc/samba$ sudo smbpasswd -a henrysbm
Cannot locate Unix account for 'henrysbm'!
henry@henry-desktop:/etc/samba$ sudo smbpasswd -a henry

New SMB password:
Retype new SMB password:
henry@henry-desktop:/etc/samba$

Registrar el usuario en el archivo /etc/samba/sbmusers








Compartir Directorios, se procede a descomentar 'comment', 'browseable', 'valid users' y 'writable' con sus respectivos valores












Se reinicia samba y se procede acceder desde un Windows XP























Directorio de linux accedido mediante samba.


















Directorio en linux:

















Etiquetas: , , , ,

0 Comentarios:

Publicar un comentario

Suscribirse a Comentarios de la entrada [Atom]

<< Página Principal