You are not logged in.

#1 2012-11-19 08:17:08

coinsyxsamba
Member
Registered: 2012-11-19
Posts: 3

samba server return NT_STATUS_ACCESS_DENIED

This problem definitely drives me crazy!!!

I just install the samba server in a host(a fresh installed Archlinux) and modify the smbd.conf following the guide. Then I use "smbclient" to connect the shared directory from another fedora machine in the same LAN. It can connect to the host successfully but each time I use "ls" to list the content of the shared directory on the host, the server just gives  NT_STATUS_ACCESS_DENIED. I have double checked the config file but cannot find any clue. Here is the smbd.conf

[global]
	workgroup = MYGROUP
	server string = Samba Server
        security = user
       load printers = yes
	log file = /var/log/samba/%m.log
	max log size = 50
	dns proxy = No
	usershare allow guests = Yes
	idmap config * : backend = tdb
[public]
   comment = Public
   path = /home/name/Public
   directory mask = 0777
   create mode = 0777
   browseable = yes
   writable = yes
   guest ok = yes
   printable = no   
   read only = no


The shared directory is located at /home/name/Public and is already chmod to 777.
Both firewalls of the host and visitor machine are shut down.

This is the prompt when I execute smbclient //ip_address/Public

Anonymous login successful
Domain=[MYGROUP] OS=[Unix] Server=[Samba 3.6.9]
smb: \> 

And this is the prompt when I use ls to list the content

smb: \> ls
NT_STATUS_ACCESS_DENIED listing \*

I have googled the solution for hours but have not got any luck, so I have to start this new thread here. Does any one can help? Thanks very much.

BTW: I really hate to waste time on such trivial system setting things. However every time I try to install samba, I get wired problems. Really don't like it.

Last edited by coinsyxsamba (2012-11-20 06:07:01)

Offline

#2 2012-11-19 14:53:34

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,004

Re: samba server return NT_STATUS_ACCESS_DENIED

I think the directory mask and the creation mask could be cancelling each other out.
It might be better to just use the guest account. 
You have a path /home/name/Public and you also have //name/Public, I don't know whether your machines name is name.
If you don't really need samba, you might try NFS which is designed for *NIX OS.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#3 2012-11-19 19:00:54

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: samba server return NT_STATUS_ACCESS_DENIED

Is your homedirectory permissions set to allow other users to enter it?
( eXecutive bit should be set on /home/name )


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

#4 2012-11-20 06:06:44

coinsyxsamba
Member
Registered: 2012-11-19
Posts: 3

Re: samba server return NT_STATUS_ACCESS_DENIED

The "//name/Public" should be "//ip address/Public". I have add name-ip_addr pair into /etc/hosts in my test machine but forgot mention it here. I have already modified my post.

I have tried 1) comment directory mask = 0777, 2) comment create mode = 0777, 3) comment both of them.  None of them work, I still get NT_STATUS_ACCESS_DENIED.

nomorewindows wrote:

I think the directory mask and the creation mask could be cancelling each other out.
It might be better to just use the guest account. 
You have a path /home/name/Public and you also have //name/Public, I don't know whether your machines name is name.
If you don't really need samba, you might try NFS which is designed for *NIX OS.

Offline

#5 2012-11-20 06:16:22

coinsyxsamba
Member
Registered: 2012-11-19
Posts: 3

Re: samba server return NT_STATUS_ACCESS_DENIED

It works. I chmod 711 to /home/name and now can visited the shared directory from another fedora machine. Thank you very much.

However, when I visited the shared directory from a WIN7 machine(/home/name has 777 mask), I was asked username and password(I don't know what should be type into cause I didn't set any username and password.). I want to visit the shared directory without any password, and I set "guest ok"  and "usershare allow guests" to "yes". But it does not work. Can you help me?

madeye wrote:

Is your homedirectory permissions set to allow other users to enter it?
( eXecutive bit should be set on /home/name )

Last edited by coinsyxsamba (2012-11-20 06:29:13)

Offline

#6 2012-11-20 16:22:27

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,004

Re: samba server return NT_STATUS_ACCESS_DENIED

coinsyxsamba wrote:

It works. I chmod 711 to /home/name and now can visited the shared directory from another fedora machine. Thank you very much.

However, when I visited the shared directory from a WIN7 machine(/home/name has 777 mask), I was asked username and password(I don't know what should be type into cause I didn't set any username and password.). I want to visit the shared directory without any password, and I set "guest ok"  and "usershare allow guests" to "yes". But it does not work. Can you help me?

madeye wrote:

Is your homedirectory permissions set to allow other users to enter it?
( eXecutive bit should be set on /home/name )

I think you still have to enable a guest account with smbpasswd, it relates smbusers with unix users/passwords.


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#7 2012-12-01 19:43:57

madeye
Member
From: Denmark
Registered: 2006-07-19
Posts: 331
Website

Re: samba server return NT_STATUS_ACCESS_DENIED

I think you need to change the "map to guest" setting. Normally this defaults to never, and will therefore ask for a password when you try to acces the share.
If you however enable the option and set it to

[global]
map to guest = bad password

then you stand a good chance that it will work. (It does on my win7 --> samba server connection )

This setting also makes it possible for guest users to browse the network and see the server. If set to never, you will not be able to see the server on a windows machine without proper login details!

EDIT: Typo wink

Last edited by madeye (2012-12-01 19:46:31)


MadEye | Registered Linux user #167944 since 2000-02-28 | Homepage

Offline

Board footer

Powered by FluxBB