Configure Samba server via command line Linux CentOS

Posted on

Configure Samba server via command line Linux CentOS – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about windows, linux, samba, , .

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

        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?

Solution :

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

To configure the server:

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


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


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= ->Allow only ip to access share, other ips are denied

Client commands:

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


Tried adding

browseable = yes

Under valid users ?

Leave a Reply

Your email address will not be published.