Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I setup CentOS and samba on a VM. I configured smb.conf and I can browse \ip_address and see files read and write. Up to here is fine.

What I want to do is (I did it before but I forgot how to do it) when I type \ip_address on windows machine I want samba to ask me username and password. Then I'll be able to see all shared folders on samba

I use the config below but samba never asks me username and password and this is a fresh installation and I don't have any saved passwords.

Samba version 3.6.9-151.el6

  comment = Web
  browsable = yes
  path = /var/www/html
  valid users = @ergec
  force group = root
  force user = root
  create mask = 0660
  directory mask = 0771
  writable = yes
  read only = No
  create mask = 00
  force create mode = 0770
  force directory mode = 0770
  guest ok = Yes
  vfs objects = recycle
share|improve this question
up vote 0 down vote accepted

The line guest ok = yes allows access for everyone, remove it. Of course, the global configuration will need appropriate options as well (e.g. security = user ) and you must have Samba users created. Read the Samba docs (especially the smb.conf man page).

share|improve this answer

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.