LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2009, 10:35 PM   #1
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5

Rep: Reputation: 0
[solved] samba "Access is denied" problem


Code:
[root@fedoravmhelm samba]# vim smb.conf

[global]
        workgroup = WRKGRP
        map to guest = Bad User
        usershare allow guests = Yes
        security = user
        log level = 10

[srv]
        comment = server base
        inherit acls = No
        path = /srv/www
        read only = No
        guest ok = yes
        browseable= Yes
        public = yes

[root@fedoravmhelm samba]# chmod 777 /srv/ -R

[root@fedoravmhelm samba]# chown eduard /srv/ -R

[root@fedoravmhelm samba]# smbpasswd eduard
New SMB password:
Retype new SMB password:

[root@fedoravmhelm samba]# ls -all /srv/www/
total 12
drwxrwxrwx. 3 eduard root 4096 2009-07-13 00:19 .
drwxrwxrwx. 4 eduard root 4096 2009-07-19 08:43 ..
drwxrwxrwx. 4 eduard root 4096 2009-07-13 08:44 sites

[root@fedoravmhelm samba]# /etc/init.d/iptables stop
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Unloading modules:                               [  OK  ]

[root@fedoravmhelm log]# echo '' > /var/log/samba/log.smbd

[root@fedoravmhelm log]# /etc/init.d/smb start
Starting SMB services:                                     [  OK  ]

[root@fedoravmhelm samba]# cp /var/log/samba/log.smbd /var/log/samba/log.smbd_after_start
Here i trying to access to my share from Vista box. Windows shows me my share "srv", but on double click it says me that "Access is denied".
Code:
[root@fedoravmhelm samba]# cp /var/log/samba/log.smbd /var/log/samba/log.smbd_after_try_to_acces
Logs are very long, if this can help - placed here: http://bareev.ru/temp/samba/

Code:
[root@fedoravmhelm samba]# uname -a
Linux fedoravmhelm 2.6.29.4-167.fc11.i686.PAE #1 SMP Wed May 27 17:28:22 EDT 2009 i686 i686 i386 GNU/Linux
I need help, thanks.

Last edited by eduardbareev; 07-19-2009 at 06:49 PM.
 
Old 07-18-2009, 10:45 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
http://www.linuxquestions.org/questi...9/#post3205636
 
Old 07-18-2009, 11:43 PM   #3
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie View Post
I add to C:\Windows\System32\drivers\etc\hosts:
192.168.1.204 fedoravmhelm.workgroup fedoravmhelm

C:\Windows\System32\drivers\etc\lmhosts.sam
192.168.1.204 fedoravmhelm.workgroup fedoravmhelm #PRE

/etc/hosts
192.168.1.111 edik-pc-vista.workgroup edik-pc-vista

/etc/samba/lmhosts
192.168.1.111 edik-pc-vista.workgroup edik-pc-vista #PRE

But problem still here.
 
Old 07-18-2009, 11:43 PM   #4
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5

Original Poster
Rep: Reputation: 0
Does anybody knows is this problem related to following lines in log?

Code:
[2009/07/19 07:22:56, 10] passdb/pdb_smbpasswd.c:getsmbfilepwent(501)
  getsmbfilepwent: LM password for user eduard invalidated
And what this means?
These lines appears in log immediately after samba starts (before i try to access share).
 
Old 07-19-2009, 06:43 AM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Ubuntu 10.04 and CentOS 5.5
Posts: 3,873

Rep: Reputation: 335Reputation: 335Reputation: 335Reputation: 335
The Lan Manager password for eduard is not valid.

When you create a Samba user you need to create a Samba user password. You do this with smbpasswd.

Code:
smbpasswd
 
Old 07-19-2009, 07:14 AM   #6
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by stress_junkie View Post
The Lan Manager password for eduard is not valid.

When you create a Samba user you need to create a Samba user password. You do this with smbpasswd.

Code:
smbpasswd
Look at the first message, i already create password using

Code:
[root@fedoravmhelm samba]# smbpasswd eduard
New SMB password:
Retype new SMB password:
Or this is not enough?
 
Old 07-19-2009, 12:38 PM   #7
wisdom
Member
 
Registered: Feb 2004
Distribution: Fedora 9
Posts: 226

Rep: Reputation: 31
If you have SELinux runing, you might want to check that its not blocking access to your shared folder, also i notice this in the log when the start to process and after the srv folder is been process
Quote:
[2009/07/19 07:22:56, 7] param/loadparm.c:lp_servicenumber(9043)
lp_servicenumber: couldn't find homes
not sure what it is but somethin you might want to check out, also can you access the samba share without a user account by chaning the "security = user" to "security = share", and try see if you can access first as a guest.
 
Old 07-19-2009, 06:38 PM   #8
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5

Original Poster
Rep: Reputation: 0
[solved] samba "Access is denied" problem

Quote:
Originally Posted by wisdom View Post
If you have SELinux runing, you might want to check that its not blocking access to your shared folder, also i notice this in the log when the start to process and after the srv folder is been process

not sure what it is but somethin you might want to check out, also can you access the samba share without a user account by chaning the "security = user" to "security = share", and try see if you can access first as a guest.
Now i just reinstalled samba and switched to "security = share" mode and make my share completely public, and it works!!! This acceptable for me.

I think you are right, important point is selinux. Now i know that in fedora it is absolutely REQUIRED to follow SELINUX NOTES section of smb.conf. Even in share mode is need to do chcon -t samba_share_t /share_folder_path for every directory you want to share. So old rule works - read manuals first

Thanks for all for help!

Last edited by eduardbareev; 07-19-2009 at 06:47 PM.
 
  


Reply

Tags
access, denied, samba, selinux, share, smb, smbd, windows



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba + CUPS "Access denied, unable to connect" error lirik Linux - Networking 10 10-13-2011 01:09 PM
"Access denied" error on Samba mount sambauser Linux - Server 2 10-16-2007 09:45 AM
squid "access.log" access denied no user name jatender Linux - Server 1 10-02-2007 04:28 AM
Samba Printing "Access Denied" !! lmaher Linux - Networking 1 06-20-2002 09:36 AM
"Access Denied" to printer and directories shared via Samba Aarstar Linux - Networking 1 03-05-2002 06:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration