$ sudo aptitude install samba $ sudo aptitude install smbfs
$ sudo smbpasswd -a usuario_del_sistema $ sudo gedit /etc/samba/smbusers
usuario_del_sistema = "usuario de red"
$ sudo smbpasswd -a usuario_del_sistema
$ sudo smbpasswd -x usuario_del_sistema
$ sudo sudo cat /etc/passwd | /usr/sbin/mksmbpasswd > /etc/samba/smbpasswd
Esto solo crea los usuarios. Tendremos ahora que asignarles una contraseña con smbpasswd.
$ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = user
... # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ... * Añade la siguiente linea debajo <file> username map = /etc/samba/smbusers
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = user
... # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ...
username map = /etc/samba/smbusers
... # By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. writable = no ...
# By default, the home directories are exported read-only. Change next # parameter to 'yes' if you want to be able to write to them. writable = yes
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo mkdir /home/group $ sudo chmod 777 /home/group/ $ sudo chmod +t /home/group/ $ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = user
... # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ...
username map = /etc/samba/smbusers
[Group] comment = Group Folder path = /home/group public = yes writable = no valid users = your_system_username1 your_system_username2 create mask = 0700 directory mask = 0700 force user = nobody force group = nogroup
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo mkdir /home/group $ sudo chmod 777 /home/group/ $ sudo chmod +t /home/group/ $ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = user
... # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ...
username map = /etc/samba/smbusers
[Group] comment = Group Folder path = /home/group public = yes writable = yes valid users = your_system_username1 your_system_username2 create mask = 0700 directory mask = 0700 force user = nobody force group = nogroup
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public $ sudo chmod 777 /home/public/ $ sudo chmod +t /home/public/ $ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = user
... # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ...
username map = /etc/samba/smbusers
[public] comment = Public Folder path = /home/public public = yes writable = no create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public $ sudo chmod 777 /home/public/ $ sudo chmod +t /home/public/ $ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = user
... # This boolean controls whether PAM will be used for password changes # when requested by an SMB client instead of the program listed in # 'passwd program'. The default is 'no'. ; pam password change = no ...
username map = /etc/samba/smbusers
[public] comment = Public Folder path = /home/public public = yes writable = yes create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public $ sudo chmod 777 /home/public/ $ sudo chmod +t /home/public/ $ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = share
[public] comment = Public Folder path = /home/public public = yes writable = no create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
$ sudo testparm $ sudo /etc/init.d/samba restart
$ sudo mkdir /home/public $ sudo chmod 777 /home/public/ $ sudo chmod +t /home/public/ $ sudo gedit /etc/samba/smb.conf
... ; security = user ...
security = share
[public] comment = Public Folder path = /home/public public = yes writable = yes create mask = 0777 directory mask = 0777 force user = nobody force group = nogroup
$ sudo testparm $ sudo /etc/init.d/samba restart