View previous topic :: View next topic |
Author |
Message |
mahdi1234 Guru
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Sep 03, 2005 5:35 pm Post subject: problem accessing mounted linux share under wxp [SOLVED] |
|
|
having setup samba on my linux machine:
smb.conf:
[global]
encrypt passwords = yes
guest account = smbguest
netbios name = mahdi
security = share
socket options = TCP_NODELAY IPTOS_LOWDELAY
wins support = yes
workgroup = mahdi
[pub]
path = /mount/usb.data
read only = no
guest ok = yes
guest only = yes
smbusers:
# Unix_name = SMB_name1 SMB_name2 ...
# $Header: /var/cvsroot/gentoo-x86/net-fs/samba/files/smbusers,v 1.4 2004/07/18 03:55:05 dragonheart Exp $
root = administrator admin mahdi smbguest
nobody = guest pcguest smbguest mahdi
with smbguest with empty password.
Then any time i try access this from windows machine i get username automatically filled as mahdi\Guest and cannot change it. Whathever typed as password (also when left empty) it says \\mahdi\pub is not accesible ...
both linux/wxp mahines are on same switch behing firewall.
Last edited by mahdi1234 on Sat Sep 03, 2005 7:01 pm; edited 1 time in total |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Sat Sep 03, 2005 5:49 pm Post subject: |
|
|
I think the reason why you cannot select a user is because you use share level security.
Try changing it to
Code: |
[global]
security = user
|
|
|
Back to top |
|
|
mahdi1234 Guru
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Sep 03, 2005 5:58 pm Post subject: |
|
|
hmm
when i change it to security = user
both \\mahdi and \\mahdi\pub are giving me access denied.
although with security = share
i could at least use \\mahdi to see that it shares folder pub, but I couldn't access \\mahdi\pub
so it looks like problem might be somewhere else. |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Sat Sep 03, 2005 6:09 pm Post subject: |
|
|
Ok, what you might also do is set the following option:
Code: |
[global]
log level = 3
|
and see what samba complains about in /var/log/samba/log.smbd
Also, if you use security = share, does the user nobody have read access to /mount/usb.data in the first place? |
|
Back to top |
|
|
mahdi1234 Guru
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Sep 03, 2005 6:40 pm Post subject: |
|
|
security = user
check_ntlm_password: Authentication for user [work_user] -> [work_user] FAILED with error NT_STATUS_NO_SUCH_USER
work_user is a domain user used at work (not in domain at home) - no idea why it tries to identify this user.
security = share
[2005/09/03 20:31:18, 3] smbd/vfs.c:vfs_init_default(203)
Initialising default vfs hooks
[2005/09/03 20:31:18, 3] smbd/sec_ctx.c:set_sec_ctx(288)
setting sec ctx (4000, 4000) - sec_ctx_stack_ndx = 0
[2005/09/03 20:31:18, 0] smbd/service.c:make_connection_snum(620)
'/mount/usb.data' does not exist or is not a directory, when connecting to [pub]
[2005/09/03 20:31:18, 3] smbd/sec_ctx.c:set_sec_ctx(288)
setting sec ctx (0, 0) - sec_ctx_stack_ndx = 0
[2005/09/03 20:31:18, 3] smbd/connection.c:yield_connection(69)
Yielding connection to pub
[2005/09/03 20:31:18, 3] smbd/error.c:error_packet(105)
error string = No such file or directory
[2005/09/03 20:31:18, 3] smbd/error.c:error_packet(129)
error packet at smbd/reply.c(416) cmd=117 (SMBtconX) NT_STATUS_BAD_NETWORK_NAME
Also I'm quite new to linux, how do I check whether nobody has rights for that folder ? ... in fstab there's
/dev/sda1 /mnt/usb.data vfat owner,uid=500,gid=100,async,rw 0 0
where this is set to uid & gid of user mahdi.
ls /mnt
drwxr--r-- 18 mahdi users 32768 Jan 1 1970 usb.data |
|
Back to top |
|
|
mahdi1234 Guru
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Sep 03, 2005 6:50 pm Post subject: |
|
|
small update:
logged as administrator instead of work_user (which is domain user on xp.
now whe running \\mahdi - i can change user and type password, ok type smbguest, psswd and voila, i can finally see list of all shared folders ...
but i still cannot view content of those shared folders ;D |
|
Back to top |
|
|
aceFruchtsaft Guru
Joined: 16 May 2004 Posts: 438 Location: Vienna, Austria
|
Posted: Sat Sep 03, 2005 6:53 pm Post subject: |
|
|
Ok, there are several errors here:
First, you told samba that the share is located in /mount/usb.data, while the actual mount point is /mnt/usb.data, that's why it can't find the directory.
Second, get rid of option "owner" in /etc/fstab, you don't need that. Instead, add umask=0022, so the mount point is world-readable and world-browsable.
Also, you have to mount the /dev/sda1 before you can access those files via samba.
See if that works. |
|
Back to top |
|
|
mahdi1234 Guru
Joined: 19 Feb 2005 Posts: 559 Location: Being There
|
Posted: Sat Sep 03, 2005 7:01 pm Post subject: |
|
|
thanks a lot it's working perfectly now! you've solved my second problem today ) |
|
Back to top |
|
|
|