LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 12-04-2008, 05:13 PM   #1
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Rep: Reputation: 15
Windows/Linux Samba Problems on Fedora 10


Hi all, I'm trying to set up Samba on Fedora 10 so that I can connect to my Windows box and it can connect to my Linux box.
I originally used this tutorial to configure it (Yes, I know it's for Ubuntu.) because that worked for me when I was setting up my Ubuntu system.
I then came across this little guide and it kind of worked.
From Windows when I run "net view \\192.168.1.4" (ip of my linux system) it shows the shares I have set up. However, Windows does not show the linux pc in My Network Places. But I have been able to connect by mapping the shares in Windows but that was only when I had no security in place in Samba.
Also, in Fedora, it can see my Windows box but when I open it, it looks like it's loading something but doesn't load anything. I am positive that there are shares on my Windows machine but Samba isn't picking them up.
Any ideas, help, or a point in the right direction is awesome. Let me know if more info is required. Thanks.

Below is my smb.conf file...
Code:
# Global parameters
[global]
       workgroup = SEPTAGON
       netbios name = LESLIE
       server string =
       map to guest = Bad User
       log file = /var/log/samba/log.%m
       max log size = 50
       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
       preferred master = No
       local master = No
       dns proxy = No
       security = User

# Share
[Data]
       path = /media/Data
       valid users = User
       read only = No
       create mask = 0777
       directory mask = 0777
 
Old 12-06-2008, 02:38 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,552

Rep: Reputation: 103Reputation: 103
Here's my config, and it does exactly what you say you need...

Code:
[global]

netbios name = stefan
workgroup = GOEDEHOOP10
security = share
log file = /var/log/samba.log 
log level =  1
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=16384 SO_SNDBUF=16384 
wins support = yes 
domain logons = no
logon drive = f: 
logon home = \\stefan\%U
os level = 99 
preferred master = yes
local master = yes
hosts allow = 10.0.0.7 10.0.0.9
encrypt passwords = yes
browseable = yes
lanman auth = yes 
lm announce = yes 

[shared]
path = /mnt/win/shared
guest ok = yes 
writeable = yes 
create mode = 0666 
directory mode = 0777
browseable = yes
public = yes
 
Old 12-07-2008, 06:53 AM   #3
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Do you have both Samba daemons, smdb & nmdb running? You can run:
Code:
$ ps aux |grep mb[d]
to check.
 
Old 12-07-2008, 07:12 PM   #4
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Original Poster
Rep: Reputation: 15
Thank you for your config file rylan76, but it didn't work for me.

Quote:
Originally Posted by archtoad6 View Post
Do you have both Samba daemons, smdb & nmdb running? You can run:
Code:
$ ps aux |grep mb[d]
to check.
Here is my output of that command. I'm not sure what it means however.
Code:
# ps aux |grep mb[d]
root      2027  0.0  0.1  17108  2600 ?        Ss   15:05   0:00 smbd -D
root      2029  0.0  0.0  17108  1188 ?        S    15:05   0:00 smbd -D
Samba now seems to be picking up none of my other systems but Windows can still Samba's shares when using the net view command. Maybe this is a firewall issue? I set Samba as a trusted service though.
 
Old 12-07-2008, 07:45 PM   #5
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
Is that your actual config? Do you really have a user called User (why are you even bothering to restrict to only one user when you set permissions to 777)?

What do your samba logs tell you when you are trying to connect?

Try disabling SELinux temporarily (setenforce 0) and see it that changes things (setenforce 1 to turn it back on)

Last edited by billymayday; 12-07-2008 at 07:46 PM.
 
Old 12-08-2008, 06:34 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
ESC201,
Your code output means that only one of the daemons, smbd, is running. Try starting nmbd, & see if that fixes your problem.

On my system nmbd is /usr/sbin/nmbd, running
Code:
/usr/sbin/nmbd -D
as root should do the trick. Also (again as root),
Code:
service start samba
works on my system.
 
Old 12-08-2008, 04:31 PM   #7
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by billymayday View Post
Is that your actual config? Do you really have a user called User (why are you even bothering to restrict to only one user when you set permissions to 777)?

What do your samba logs tell you when you are trying to connect?

Try disabling SELinux temporarily (setenforce 0) and see it that changes things (setenforce 1 to turn it back on)
I actually have no idea how that got like that. The correct smb.conf that I'm using is below. I must have copied the old one by mistake. I have everything set as 777 right now for testing purposes. I intend to increase security and permissions once it is working.
Which Samba log are you referring to? For the sake of space I don't want to post every log in the /var/log/samba directory.
And SELinux has not changed anything. Thank you though.

archtoad6, I tried starting nmbd "/usr/sbin/nmbd -D" and "/etc/init.d/nmb restart". Neither has worked. Below is my output of "ps aux |grep mb[d]" now.

Code:
root      1398  0.0  0.0  10772  1632 ?        Ss   17:13   0:00 nmbd -D
root      1399  0.0  0.0  10648   648 ?        S    17:13   0:00 nmbd -D
root      1493  0.0  0.1  17144  2580 ?        Ss   17:13   0:00 smbd -D
root      1495  0.0  0.0  17144  1096 ?        S    17:13   0:00 smbd -D
Below is the smb.conf file I am using now. I have my system set up as a WINS server on my Windows machine so I've added wins support in there.

Code:
# Global parameters
[global]
       workgroup = SEPTAGON
       netbios name = LESLIE
       map to guest = Bad User
       log file = /var/log/samba/log.%m
       max log size = 50
       socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
       preferred master = No
       local master = No
       dns proxy = No
       security = User
        wins support = yes
# Share
[Data]
       path = /media/Data
       valid users = Shane
       read only = No
       create mask = 0777
       directory mask = 0777
 
Old 12-08-2008, 04:52 PM   #8
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
So Shane is a valid samba user?

The log will be in /var/log/samba/log.%m where %m is the client name
 
Old 12-08-2008, 06:38 PM   #9
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Original Poster
Rep: Reputation: 15
Yes, Shane is the user I log onto my system as. As I understand I just need to run smbpasswd to set samba up with that user.

I have the following log files in /var/log/samba
log.smbd
log.nmbd
log.__ffff_192.168.1.3 <-- I assume you mean this one as that is the ip of my Windows machine. However, it is an empty file.
 
Old 12-08-2008, 06:52 PM   #10
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
Can you post the output of

ls -l /media
ls -l /media/Data
pbedit -L

and see if anything is getting logged at all (I often use ls -lrt /var/log to see what's logged around the time of an error)
 
Old 12-08-2008, 08:56 PM   #11
ESC201
Member
 
Registered: Sep 2008
Distribution: Kubuntu 11.04
Posts: 85

Original Poster
Rep: Reputation: 15
ls -l /media
Code:
drwxr-xr-x 13 Shane root 16384 1969-12-31 19:00 Data
ls -l /media/Data
Code:
-r-xr-xr-x  1 Shane root     0 2007-11-25 16:40 Bluetooth Exchange Folder
-rwxr-xr-x  1 Shane root    76 2008-12-01 22:19 desktop.ini
-r-xr-xr-x  1 Shane root     0 2007-11-25 16:38 filelib
drwxr-xr-x  3 Shane root 16384 2008-12-02 17:56 _gsdata_
drwxr-xr-x  4 Shane root 16384 2008-12-05 20:04 kde4-install
drwxr-xr-x  4 Shane root 16384 2008-12-05 20:04 modules
drwxr-xr-x 71 Shane root 49152 2008-12-02 00:06 My Downloads
dr-xr-xr-x  7 Shane root 16384 2008-12-01 23:39 My Music
drwxr-xr-x  5 Shane root 16384 2008-12-01 23:11 My Pictures
drwxr-xr-x  9 Shane root 16384 2008-12-02 00:05 My Programs
drwxr-xr-x  7 Shane root 16384 2008-12-01 20:11 My Videos
drwxr-xr-x 16 Shane root 16384 2008-12-01 21:33 Other
drwxr-xr-x  3 Shane root 16384 2008-12-01 23:09 Recycled
I share that partition with my Windows install which is why there are Windows files in there.

I get a command not found with "pbedit -L"
And here is my output of "ls -lrt /var/log/samba" if it is relevant...
Code:
-rw-r--r-- 1 root root    0 2008-12-03 22:12 log.__ffff_192.168.2.3
drwx------ 2 root root 4096 2008-12-07 15:10 old
drwx------ 4 root root 4096 2008-12-08 16:13 cores
-rw-r--r-- 1 root root 2501 2008-12-08 17:13 log.nmbd
-rw-r--r-- 1 root root 1994 2008-12-08 17:13 log.smbd
 
Old 12-08-2008, 09:04 PM   #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
Sorry -pdbedit not pbedit

What filesystem is /media/Data, and now is it mounted (show "mount | grep Data")
 
Old 12-09-2008, 03:45 AM   #13
awnun
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
hi,
in the smb.conf
u must search like this:
/ chcon
and u must change as u can see

sencond. u can stop the iptables.
 
Old 12-09-2008, 03:50 AM   #14
awnun
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
chcon -t samba_share_t /media/Data
 
Old 12-09-2008, 03:51 AM   #15
awnun
LQ Newbie
 
Registered: Sep 2007
Posts: 5

Rep: Reputation: 0
service nfs restart


nfs must be started.
because the mount depends on it
 
  


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
cp from Windows XP/ntfs to Linux via samba problems ccee General 0 02-02-2008 11:44 AM
samba on fedora connects to linux machine but unseen on windows machines vyom Linux - Networking 5 07-04-2006 02:25 AM
Fedora Core 5, Samba and Windows 98 lbclinux Linux - Networking 1 05-28-2006 09:04 AM
samba + cups + windows xp + fedora c2 jonthelam Linux - Software 9 02-14-2006 12:05 PM
Problems sharing the printer on Linux via Samba to Windows computers melao SUSE / openSUSE 25 03-22-2005 09:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:30 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