Archive for febbraio, 2011

Configurare SAMBA per accedere da Windows *** FUNZIONA !

febbraio 15th, 2011 -- Posted in LINUX - How To | No Comments »

- Installare Samba

- Editare il file di configurazione come segue

/etc/samba/smb.conf

Esempio :

[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[wwwroot]
path = /home/WWW
available = yes
browsable = yes
public = yes
writable = yes
create mask = 0755
directory mask = 0755

- Creare utente

adduser smbuser #add unix account
passwd smbuser #set unix account password
smbpasswd -a smbuser #lets create same user account on samba
<put same password as your unix account password>
/etc/init.d/smb restart

- Attenzione ad aventuali FW attivi Selinux

Solution 1 (temporary; won’t survive a re-boot):
Issue the command:
[root]# setsebool samba_enable_home_dirs=1

Solution 2 (might survive a reboot; I didn’t actually try this one):
[root]# setsebool -P samba_enable_home_dirs=1

Solution 3 (survives a reboot):
This is the solution I ultimately settled on. Go to the /etc/selinux/targeted directory. Create a text file called booleans.local, and put the “samba_enable_home_dirs=1″ line in it (without the quotes, of course).

Solution 4 (surives a reboot, but removes all SELinux protection):
Edit /etc/selinux/config. Change the line SELINUX=enforcing to SELINUX=permissive or SELINUX=disabled.