LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   samba share prompt username/password question (https://www.linuxquestions.org/questions/linux-server-73/samba-share-prompt-username-password-question-756877/)

cpthk 09-21-2009 06:40 PM

samba share prompt username/password question
 
Hi:

I have setted up my samba server. I tested from my windows side, all the public ones works fine except the [homes]

Here is my [homes] setting:
Code:

[homes]
comment = Home Directories
browseable = yes
writable = yes

The homes is suppose to let each user see his/her own home directory. But I tested at the windows side, I found that windows doesn't even prompt me about username or password, it just directly give me "not accessible" error. How do I config so my windows side at least prompt me about username/password?

frankbell 09-21-2009 06:50 PM

I had this problem once and, on the advice of a friend, I installed NetBEUI and it fixed it.

That doesn't work with Windows systems more recent than XP.

michaelk 09-21-2009 07:10 PM

Please tell us what distribution/version you are using and the samba version if known. Also the windows version might be helpful too.

Did you modify the default configuration? If the public shares are visible then it would not be a NetBEUI issue.

cpthk 09-21-2009 07:29 PM

I have version 3.3.2. My windows is XP SP3. My server is ubuntu 9.04

michaelk 09-21-2009 08:16 PM

Ok lets see your smb.conf file and please leave out the comments.

cpthk 09-21-2009 08:37 PM

Code:


[global]

  dns proxy = no
  log file = /var/log/samba/log.%m
  max log size = 1000
  syslog = 0
  panic action = /usr/share/samba/panic-action %d
  encrypt passwords = true
  passdb backend = tdbsam

  obey pam restrictions = yes
  unix password sync = yes
  passwd program = /usr/bin/passwd %u
  passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .

  pam password change = yes
  map to guest = bad user

[homes]
  comment = Home Directories
  browseable = yes
  read only = no


[public]
    path = /home/public
    public = yes
    writable = yes
    browseable = yes

It seems windows use windows login name to try to login samba. It doesn't prompt me username or password. It could be a windows side issue too.

Thanks.

michaelk 09-21-2009 08:56 PM

BTW did you add users via smbpasswd command?

cpthk 09-21-2009 09:40 PM

yes, I did.

michaelk 09-23-2009 12:43 PM

IS SElinux running by any chance?

JamesChamberlain 09-23-2009 01:03 PM

Am i wrong in assuming that there's no path under the [homes] section of the smb.conf ?

michaelk 09-23-2009 01:11 PM

If I understand your question then yes no path is required for [homes]. samba automatically creates a home directory share for each user. samba also automatically creates shares for all printers if [printers] exists.

JamesChamberlain 09-23-2009 02:50 PM

Quote:

Originally Posted by michaelk (Post 3694532)
If I understand your question then yes no path is required for [homes]. samba automatically creates a home directory share for each user. samba also automatically creates shares for all printers if [printers] exists.

Okay, Cheers for clearing that up.. :)

cpthk 09-23-2009 11:19 PM

thanks guys, I finally found the reason. Windows xp automatically use currently logged in local account to login samba share. So I would have to create a exactly same username at linux side. If the password is also the same, windows would login directly. If password is not the same, windows will pop up prompt to ask username and password.


All times are GMT -5. The time now is 08:24 AM.