sudo apt-get install cifs-utils
Creamos un fichero con las credenciales
sudo vi /root/.smbcredentials
user=nombre_usuario
password=contraseña
password=contraseña
Creamos una carpeta para el montaje en /media
sudo mkdir /media/ejemplo
Luego editamos el fstab y añadimos las líneas en azul adaptándola a la configuración de nuestro equipo.
sudo vi /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=9afdc42a-d90e-484d-a510-3238f4002ae7 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda2 during installation
UUID=a45ec25c-7f45-4dc8-93ff-a6d743f685f4 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
#
//192.168.1.3/ejemplo /media/ejemplo cifs credentials=/root/.smbcredentials,rw,iocharset=iso8859-1,dir_mode=0777,file_mode=0777,noperm 0 0
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=9afdc42a-d90e-484d-a510-3238f4002ae7 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda2 during installation
UUID=a45ec25c-7f45-4dc8-93ff-a6d743f685f4 none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
#
//192.168.1.3/ejemplo /media/ejemplo cifs credentials=/root/.smbcredentials,rw,iocharset=iso8859-1,dir_mode=0777,file_mode=0777,noperm 0 0
Para forzar el montaje recargando fstab
sudo mount -a
Fuentes:
https://wiki.ubuntu.com/MountWindowsSharesPermanently
No hay comentarios:
Publicar un comentario