LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Newbie
User Name
Password
Linux - Newbie This 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

Tags used in this thread
Popular LQ Tags , , , , , , ,

Reply
 
Thread Tools
Old 07-18-2009, 11:35 PM   #1
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5
Thanked: 0
[solved] samba "Access is denied" problem


[Log in to get rid of this advertisement]
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 07:49 PM..
eduardbareev is offline  
Tag This Post , , , , , , ,
Reply With Quote
Old 07-18-2009, 11:45 PM   #2
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Kubuntu 8.04 32 bit and 64 bit, PCLOS 2009
Posts: 2,665
Thanked: 50
http://www.linuxquestions.org/questi...9/#post3205636
stress_junkie is offline     Reply With Quote
Old 07-19-2009, 12:43 AM   #3
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5
Thanked: 0

Original Poster
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.
eduardbareev is offline     Reply With Quote
Old 07-19-2009, 12:43 AM   #4
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5
Thanked: 0

Original Poster
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).
eduardbareev is offline     Reply With Quote
Old 07-19-2009, 07:43 AM   #5
stress_junkie
Senior Member
 
Registered: Dec 2005
Location: Massachusetts, USA
Distribution: Kubuntu 8.04 32 bit and 64 bit, PCLOS 2009
Posts: 2,665
Thanked: 50
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
stress_junkie is offline     Reply With Quote
Old 07-19-2009, 08:14 AM   #6
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5
Thanked: 0

Original Poster
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?
eduardbareev is offline     Reply With Quote
Old 07-19-2009, 01:38 PM   #7
wisdom
Member
 
Registered: Feb 2004
Distribution: Fedora 9
Posts: 226
Thanked: 2
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.
wisdom is offline     Reply With Quote
Thanked by:
Old 07-19-2009, 07:38 PM   #8
eduardbareev
LQ Newbie
 
Registered: Jul 2009
Location: Russia, Kazan.
Posts: 5
Thanked: 0

Original Poster
[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 07:47 PM..
eduardbareev is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 7 03-22-2008 10:54 AM
"Access denied" error on Samba mount sambauser Linux - Server 2 10-16-2007 10:45 AM
squid "access.log" access denied no user name jatender Linux - Server 1 10-02-2007 05:28 AM
Samba Printing "Access Denied" !! lmaher Linux - Networking 1 06-20-2002 10:36 AM
"Access Denied" to printer and directories shared via Samba Aarstar Linux - Networking 1 03-05-2002 07:38 PM


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

Main Menu
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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration