Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to get samba working on centOS... I installed it via Yum, changed the samba config file to:

[ShareName]
        path = /var/www/html/
        public = no
        writable = yes
        printable = no
        create mask = 0765
        valid users = username

Restarted samba and it did nothing.. the windows network is not seeing the share at all. I realize there is most likely something I am missing but I have always done it with the GUI, but unable to do that this time.. Any pointers?

share|improve this question
add comment

migrated from stackoverflow.com Aug 5 '11 at 13:07

This question came from our site for professional and enthusiast programmers.

3 Answers

To configure the server:

mkdir /samba
chmod a+w /samba
yum install samba -y
vim /etc/samba/smb.conf 

Content:

[public]
comment = Only users
path = /samba
public = yes
browseable=yes
writable = yes
printable = no
write list = +staff

finally:

service smb restart

Possible permissions:

  • browseable=yes ->we CAN see the shared dir
  • browseable=no -> we CANNOT see the shared dir
  • public=yes ->Allows anonymous Login
  • public=no ->Stops anonymous Login
  • writable = no ->uploading is denied for BOTH the users.
  • writable = yes ->uploading is allowed for BOTH the users
  • hosts allow=192.168.0.20 ->Allow only 192.168.0.20 ip to access share, other ips are denied

Client commands:

  • smbclient -L //192.168.0.48/share ->List directories shared
  • smbclient //192.168.0.48/share ->Anonymous Login
  • smbclient //192.168.0.48/share -U u1 ->Non Anonymous Login
  • get <file>
  • put <file>

Source

share|improve this answer
add comment

Tried adding

browseable = yes

Under valid users ?

share|improve this answer
add comment

You can use testparm -v to test and see the parameters. Maybe browsable is set to no.

share|improve this answer
    
It only shows path = /var/www/html/ read only = No guest ok = Yes –  Greg Alexander Aug 4 '11 at 21:52
    
But even if I add new params and restart smb, it doesn't take –  Greg Alexander Aug 4 '11 at 21:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.