LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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-2006, 04:55 PM   #1
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Rep: Reputation: 0
can't get samba home directories to work


I am running Fedora Core 5 on my Linux box and want to use it as a file server to house the my documents folders from my Windows PCs. I have shares created and can see them in network neighborhood on the Windows computers, but it says it is not accessible, I may not have permission, and the network path was not found. It doesn't even prompt me for a username and password. I did use smbpasswd -a to create usernames and passwords. I have been using SWAT to modify the smb.conf file. Also, my public shares will not allow me write access from the Windows PCs. Sigh... thanks in advance for the help. Here is my smb.conf file:
[global]
netbios name = NO-NO
server string = Linux file server
guest account =
unix password sync = Yes
log file = /usr/local/samba/var/%m.log
max log size = 50
load printers = No
dns proxy = No
ldap ssl = no
admin users = neddis
hosts allow = 192.168.0.0/255.255.255.0

[homes]
comment = Home Directories
path = /home/%u
read only = No
max connections = 10
browseable = No

[music]
comment = Music
path = /public/music
write list = neddis
read only = No

[download]
comment = Downloaded Files
path = /public/download
write list = neddis
read only = No

[temp]
comment = Temporary files
path = /public/temp
read only = No
 
Old 07-18-2006, 06:19 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I don't see a "security =" entry in the [Global] section.
 
Old 07-18-2006, 06:52 PM   #3
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Original Poster
Rep: Reputation: 0
Oops, thanks for catching that.

Ok, now I swear I didn't change ANYTHING at all and when I do 'service smb status' I get 'smbd dead but pid file exists' and 'nmbd (pid 3333) is running'. What happened? I did some searching online found that other people have deleted smbd.pid and that fixed it. I have deleted the smbd.pid file several times and that does not help. Smb is also supposed to be generating a log file, but it's not in the location I specified in smb.conf. I am ready to beat this thing with a big stick. Thanks.
 
Old 07-19-2006, 12:34 AM   #4
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Original Poster
Rep: Reputation: 0
I just happened to look on the monitor of the linux box I am trying to work with (I have been using SSH to do all of this remotely). I think samba is dumping log info to the screen instead of a file. It says something like this:

audit(11532085633.826:348): avc: denied { append } for pid=5076 comm="smbd" name="smb.log" dev=dm-0 ino=90144174 scontext=root:system_r:smbd_t:s0 tcontext=root object_r:usr_t:s0 tclass=file

and it seems to post this message every time I try and start samba. I am way lost. Thanks in advance for the help.
 
Old 07-19-2006, 12:44 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
First, run the "testparm" program whenever you edit the "smb.conf" file. It will check it for correctness.

The log message that you see looks like an SELinux message. If you are using SEL then check that samba is allowed to read it's own configuration files and write to the log file.

After running "service smb status" and getting the message that it was dead, did you run "service smbd start".

Last edited by jschiwal; 07-19-2006 at 12:47 AM.
 
Old 07-19-2006, 01:26 AM   #6
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Original Poster
Rep: Reputation: 0
I have no idea how to manipulate SELinux... hmm...

I have tried to stop, start, restart so many times it's rediculous.

I have also run testparm after changing the smb.conf file each time. It didn't give me an error about missing security =.
 
Old 07-19-2006, 01:32 AM   #7
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
you can temporarily set SELinux to permissive with

setenforce 0

From gnome in FC5 you can disable SELinux for Samba through security settings (sorry, in Windows at the moment), but don't know how to do it from the terminal.

See if it works after the temporary disable and let us know what happens

Last edited by billymayday; 07-19-2006 at 01:33 AM.
 
Old 07-19-2006, 01:47 AM   #8
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Original Poster
Rep: Reputation: 0
It didn't work - the same thing happened. It put the 'audit: (numbers here) avc: denied' error on the host computer and won't start smbd. I even modified the SELinux config to disabled (and rebooted) and the same thing happens. I am totally stumped. On another thread I found out a possibility of why I couldn't aceess my home directories, but I can't test it because I can't get smb to start! This all started when I used yum to update my whole FC5 installation.
 
Old 07-19-2006, 01:48 AM   #9
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Since you are using swat, see if you can install the samba-docs package. It includes a large number of man pages, and either pdf or post script versions of three Samba Books including Bruce Perens' Samba 3 by Example. One of the example configurations could serve as a template. Using "security = server" is not recommended. Also, if some of the computers on the network are XP Home Edition, then you can't use "security = domain" as they are unable to join domains. ( Microsoft crippled networking in the Home edition to force companies to purchase the more expensive Professional Edition).

/usr/share/doc/packages/samba/Samba3-HOWTO.pdf
/usr/share/doc/packages/samba/Samba3-ByExample.pdf
/usr/share/doc/packages/samba/Samba3-Developers-Guide.pdf
 
Old 07-19-2006, 02:19 AM   #10
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Original Poster
Rep: Reputation: 0
I do have that docs package and have been referring to it. testparm says the smb.conf file is ok. I just can't get samba to start now. I think it's an SELinux problem. I will start another thread for that though - http://www.linuxquestions.org/questi...d.php?t=465422

Last edited by neddis; 07-19-2006 at 11:43 AM.
 
Old 07-19-2006, 03:16 AM   #11
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Setenforce 0 should work, but it will keep logging

Just a hunch, but try a different netbios name - the dash may cause an issue.

I'll have a better look and the conf file a bit later
 
Old 07-19-2006, 03:56 AM   #12
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
neddis, here are some relevant bits from my smb.conf

Quote:
[global]
log file = /var/log/samba/%m.log
dns proxy = no
load printers = yes
cups options = raw
netbios name = gandalf
server string = Samba Server
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
workgroup = HOME
os level = 20
null passwords = yes
encrypt passwords = yes
printcap name = /etc/printcap
security = user
max log size = 50
and my home definition

Quote:
[home]
comment = User home Samba storage
writeable = yes
create mode = 775
path = /home/%u/Samba
directory mode = 775
I haven't tried the unix password sync option, but looking at the example config that comes with samba, you need more around this option than you seem to have. Here is what the sample says.

Quote:
# The following are needed to allow password changing from Windows to
# update the Linux system password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
; unix password sync = Yes
; passwd program = /usr/bin/passwd %u
; passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
Try without this option set.

Hope these help a bit
 
Old 07-19-2006, 05:33 PM   #13
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
neddis, have a look at

http://www.linuxhomenetworking.com/#Linux

Maybe it will help
 
Old 07-19-2006, 11:22 PM   #14
neddis
LQ Newbie
 
Registered: Apr 2006
Location: Eastern Oregon
Distribution: Fedora Core 6
Posts: 18

Original Poster
Rep: Reputation: 0
Well, thanks a bunch for all the help. It was SELinux causing me to not be able to access my folders. I will take a look at that linux home networking site though, that looks like something I definitely need to read. As for getting rid of the audit error, I have no idea what I did to fix it. It didn't go away when I disabled SELinux, but something I did after that made samba able to load again.
 
Old 07-20-2006, 12:17 AM   #15
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
One thing to keep in mind, is that in a windows network, it can take some time for a computer to show up in the browser after making changes.

I found this link that deals with web-site configuration and SELinux. Perhaps it can help.
http://yolinux.com/TUTORIALS/LinuxTu...iteConfig.html

Last edited by jschiwal; 07-20-2006 at 04:09 PM.
 
  


Reply



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 =sharing home directories memba4life Linux - Networking 3 05-06-2017 09:18 AM
.htaccess files doesn't work in home directories rehtorisi Linux - Software 3 08-08-2005 08:02 AM
samba: home directories not visible flipboi Linux - Networking 1 05-27-2004 11:06 PM
Samba and Home Directories dlucas10 Linux - Networking 5 10-28-2003 12:51 PM
mounting home directories from samba? tommyj27 Linux - Networking 2 08-27-2003 04:49 PM

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

All times are GMT -5. The time now is 04:25 AM.

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