Montar NTFS sobre Solaris via CIFS

Page last edited hace 2181 días 2 horas
De Solaris-ES
Saltar a: navegación, buscar

Instalamos los paquetes de samba[editar]

$ pfexec pkg install service/file-system/smb
           Packages to install:   2
       Create boot environment:  No
Create backup boot environment: Yes
            Services to change:   1

DOWNLOAD                                PKGS         FILES    XFER (MB)   SPEED
Completed                                2/2         92/92      2.5/2.5  530k/s

PHASE                                          ITEMS
Installing new actions                       204/204
Updating package state database                 Done 
Updating image state                            Done 
Creating fast lookup database                   Done 
Reading search index                            Done 
Updating search index                            2/2 


$ smb
smbadm       smbclient    smbcquotas   smbget       smbpasswd    smbspool     smbstatus    smbtar       
smbcacls     smbcontrol   smbd         smbios       smbprofiles  smbstat      smbta-util   smbtree      

Iniciamos los servicios de Cliente y Server[editar]

$ pfexec svcs -a | grep -i smb
disabled       19:50:37 svc:/network/smb/server:default
disabled       19:50:38 svc:/network/smb/client:default
online         19:50:37 svc:/network/smb:default

$ pfexec svcadm enable -r smb/server
$ pfexec svcadm enable -r smb/client

Verificamos las carpetas compartidas del Windows[editar]

$ pfexec smbadm show-shares 192.168.1.4
Enter password: XXXXXXXXXXXX
ADMIN$              Remote Admin
C$                  Default share
D$                  Default share
E$                  Default share
F$                  Default share
G$                  Default share
IPC$                Remote IPC
print$              Printer Drivers
Users               
Z$                  Default share
12 shares (total=12, read=12)
IMPORTANTE: El comando smbutil no existe en las releases de Solaris 11, en su lugar se tendra que utilizar smbadm show-shares

Sintaxis del mount[editar]

//[domain;][user[:password]@]server/share mount-point

Preparamos un directorio, asignamos permisos y montamos el FS remoto[editar]

root@sol11:~# chown mariano:staff /network
$ pfexec mount -F smbfs //192.168.1.4/D$ /network
$ cd /network
$ ls -la
total 30586622
drwx------+  1 2147483649 2147483650   28672 Oct 20 16:34 .
drwxr-xr-x  25 root     root          28 Oct 31 19:50 ..
drwx------+  1 2147483649 2147483654     512 Sep  9 23:47 $RECYCLE.BIN
-rwx------+  1 2147483649 2147483650     111 Jul 14  2010 bootSolarisVM-BG.cmd
-rwx------+  1 2147483649 2147483650     111 Jul 31  2010 bootTixBoxVM-BG.cmd
-rwx------+  1 2147483649 2147483650  492341 Jan 30  2010 client_bridge_setup.pdf
drwx------+  1 2147483649 2147483650     512 Oct 30 20:15 eMovie
drwx------+  1 2147483649 2147483650     512 Feb 22  2009 eMule0.49c
drwx------+  1 2147483649 2147483650     512 Dec  4  2009 hamster
drwxrwx---+  1 2147483651 2147483648     512 Jun 26 19:09 IDE
drwx------+  1 2147483649 2147483650     512 Jun 19 18:39 img
-rwx------+  1 2147483649 2147483650 19876344 Apr 15  2012 Imported Movie.mov
-rwx------+  1 2147483649 2147483650 70510830 Apr 15  2012 Imported Movie1.mov
drwxrwx---+  1 2147483649 2147483651     512 Jul 21 12:42 MSOCache
drwx------+  1 2147483649 2147483650     512 Oct 11  2011 OpenVPN
drwxrwx---+  1 2147483651 2147483648     512 Oct 20 16:36 Perl64
drwxrwx---+  1 2147483651 2147483648     512 Oct 20 16:32 Program Files
drwx------+  1 2147483649 2147483654     512 Oct 19 23:26 Program Files (x86)
drwxrwx---+  1 2147483651 2147483648     512 Jul 31 21:33 Python32
-rwx------+  1 2147483649 2147483650      82 Nov 28  2009 save_state_vm.cmd
drwx------+  1 2147483649 2147483650     512 Oct 21 20:24 Soft
-rwx------+  1 2147483649 2147483654 15569432576 Oct 29 17:16 Solaris 11.vdi
drwxrwx---+  1 2147483649 2147483648     512 Jun 18 21:58 System Volume Information
drwxr-x---+  1 2147483649 2147483650     512 Oct 13 09:09 Temp
drwx------+  1 2147483649 2147483650     512 Aug 28  2010 wifi
$ df -h
Filesystem             Size   Used  Available Capacity  Mounted on
//192.168.1.4/D$       396G   257G       139G    65%    /network


Montar la carpeta normalmente[editar]

# mount -F smbfs "//ALLANGLESIT;administrator@winfileserver/share" /network

Montar la carpeta en Read Only[editar]

# mount -F smbfs -o ro "//ALLANGLESIT;administrator@winfileserver/share" /network
"//192.168.1.4/;administrador@D$

Edite el archivo pam.conf para permitir la autenticacion via SAMBA[editar]

Nota: Sume la siguiente linea.

$ vi /etc/pam.conf
other   password required      pam_smb_passwd.so.1 nowarn

Como personalizar el environment global de CIFS sobre Solaris[editar]

Sintaxis[editar]

# sharectl set [-h] [-p property=value] … smbfs

Ejemplos[editar]

Definimos el default workgroup como SALES

# sharectl set -p section=default -p workgroup=SALES smbfs

Verificar el environment global de CIFS[editar]

$ sharectl get smbfs