LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-08-2004, 09:54 PM   #1
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 195

Rep: Reputation: 31
how do i configure samba "smb"


since i've upgraded to fedora i haven't been able to connect to my windows machines. when i select "Network Servers" from the start menu and then select Windows Networks i get "Sorry, couldn't display all the contents of "Windows Network: name of network neighborhood"."

i'm running smbd version 3.0.3-5

i believe this has some thing to do with passwords or the way they are being passed... does anyone know? there is a config file under /etc/samba/smb.conf....

from a shell if i type smbclient \\\\machine name\\share name password it will connect.
 
Old 05-09-2004, 03:36 AM   #2
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Are you just trying to mount a network smb filesystem from a different (windows) computer? If so, can I see your /etc/fstab file?
 
Old 05-09-2004, 05:04 AM   #3
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
If connecting from a shell works, then Samba is properly configured; the terminal is using the same Samba daemon (and thus the same /etc/samba/smb.conf) as LinNeighborhood, the GNOME Samba Browser, the KDE Lan Browser, and whatever other graphical frontends to smbclient there might be.

So likely whatever you're using when you're not using the shell command is misconfigured in some way. What program or file would that be, then?
 
Old 05-09-2004, 05:34 AM   #4
rykel
Member
 
Registered: Jan 2004
Location: Singapore
Distribution: Main Distros: Ubuntu & SUSE, OTHERS: MEPIS, FC, Mandriva, Linspire, Xandros, Knoppix
Posts: 58

Rep: Reputation: 15
hello motub,

IF u are trying to access a shared folder on ur fedora core PC from a windows Network Neighbourhood, it's very simple.

first, make sure tat samba AND samba-client are installed in the first place... common sense...

then, go to System Settings\Server Settings\Services. make sure "smb" (ie. samba) is running!!

then go back to System Settings\Server Settings\Samba and choose one of ur folders to be e shared folder.

oh, also make sure tat ur Firewall is turned OFF... it might help!!

pls let me know if my suggestion helped u!!


regards,

rykel
singapore

ps. i try to use only my mouse in linux, since tat was wat X windows was created for, and wat ppl from mac and windows are looking for... let me show them the way... as time permits, i am also learning the command line for backup purposes!!
 
Old 05-09-2004, 06:27 AM   #5
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
rykel.... hello to you as well.

I am not the one with the problem (RottenMutt is-- on my system, my Windows and Network partitions are mounted and accessible with no problems), and while your advice is fine for someone trying to connect to a Linux box from a Windows box, what RottenMutt has said is that s/he is trying to connect to his/her Windows box from his/her Linux box, which is the opposite of your instructions.

RottenMutt has also said that under some circumstances s/he can in fact connect, but in others, s/he cannot. So the problem would not seem to be a general misconfiguration or authentication problem, but instead a very specific one (a problem with LinNeighborhood, or the KDE Lan Browser in particular, rather than a problem with Samba in general, otherwise RottenMutt would fail to connect under all circumstances, including when using shell commands-- but this is not the case).

But to fix a more specific error like the one this seems to be, more details are needed. And while we wait for RottenMutt to provide them, perhaps you could read more carefully before dashing off an answer .
 
Old 05-09-2004, 05:10 PM   #6
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 195

Original Poster
Rep: Reputation: 31
Quote:
Originally posted by adz
Are you just trying to mount a network smb filesystem from a different (windows) computer? If so, can I see your /etc/fstab file?
fstab:
LABEL=/ / ext3 defaults 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda3 swap swap defaults 0 0
/dev/fd0 /mnt/floppy auto noauto,owner,kudzu 0 0
/dev/cdrom /mnt/cdrom udf,iso9660 noauto,owner,kudzu,ro 0 0
/dev/cdrom1 /mnt/cdrom1 udf,iso9660 noauto,owner,kudzu,ro 0 0


Quote:
Originally posted by motub
If connecting from a shell works, then Samba is properly configured; the terminal is using the same Samba daemon (and thus the same /etc/samba/smb.conf) as LinNeighborhood, the GNOME Samba Browser, the KDE Lan Browser, and whatever other graphical frontends to smbclient there might be.
So likely whatever you're using when you're not using the shell command is misconfigured in some way. What program or file would that be, then?
My thoughts exactly, i'm running GNOME. I click “network servers” which launches nautilus network, which i don't think is passing my account and password to windows. I can see my workgroup but not the computers within the work group.

Quote:
Originally posted by rykel
hello motub,

IF u are trying to access a shared folder on ur fedora core PC from a windows Network Neighborhood, it's very simple.
first, make sure tat samba AND samba-client are installed in the first place... common sense...
then, go to System Settings\Server Settings\Services. make sure "smb" (ie. samba) is running!!
then go back to System Settings\Server Settings\Samba and choose one of ur folders to be e shared folder.
oh, also make sure tat ur Firewall is turned OFF... it might help!!
pls let me know if my suggestion helped u!!
regards,
rykel
singapore

ps. i try to use only my mouse in linux, since tat was wat X windows was created for, and wat ppl from mac and windows are looking for... let me show them the way... as time permits, i am also learning the command line for backup purposes!!
how do i share a folder in linux?
 
Old 05-09-2004, 06:03 PM   #7
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Quote:
I click “network servers” which launches nautilus network, which i don't think is passing my account and password to windows. I can see my workgroup but not the computers within the work group.
Which GNOME version? I'm using 2.6.0.1, and if I use the smb:\\ browser in Nautilus, I can also see both network computers (mine and the Windows computer), but cannot get into the Windows computer, and I am not even asked for a username or password. Presumably it's passing my UNIX username and password to the Windows computer; unfortunately, my UNIX username and password is not known to that computer, and it's not going to be (under Win 2k and XP, the network users must be added as users to the sharing computer's list of authorized users by the Administrator).

However, since I use LinNeighborhood to mount the shared network drives anyway, I don't particularly care that the Nautilus SMB browser seems not to work properly; but-- just so you know-- it does not seem to work properly. You might want to find an alternative such as LinNeighborhood, the GNOME Samba browser (which is not the same as the Nautilus smb add-on), a KDE program that does the same thing (I think it's called KDE LAN Browser or something), or even the Gnome Commander file manager. I find it easiest to let LinNeigborhood mount the network shares into my $HOME folder at startup, then I can just use them normally in Nautilus.

Quote:
how do i share a folder in linux?
Well, depending on what you want to do, you may be able to adapt one or more of the examples in /etc/samba/smb.conf, but here's how I do it:


Quote:
[homes]
comment = Home Directories
browseable = no
writable = yes

# You can enable VFS recycle bin on a per share basis:
# Uncomment the next 2 lines (make sure you create a
# .recycle folder in the base of the share and ensure
# all users will have write access to it. See
# examples/VFS/recycle/REAME in the samba docs for details
; vfs object = /usr/lib/samba/vfs/recycle.so

<giant snip of the various examples>

[shared]
comment = shared stuff
path = /home/shared
valid users = me my_boyfriend
(we are both users on my computer; we have both been added and enabled in smbpasswd; and we are both members of the same custom group-- in fact, the only members of that group-- and that group is the group owner of this folder; permissions were set as full for members of the group when the folder was created by the owner, me )
public = no
writable = yes
printable = no
create mask = 0770
(further insurance that only me and he can read from or write to this directory; all files are owned by the creator and the group with full permissions; but "others" who are neither the creator nor members of the group have no permissions whatsoever)
follow links = yes
wide links = yes
The "wide links" setting means that I can create a symlink to the folder in my own $HOME directory where my MP3s are mounted in /home/shared, and he can follow the link, even though it leads outside the shared directory. Which is how I do it (our custom group is my default group, and I have given the group rwx permissions to this mount in /etc/fstab using the gid= option, so once he's there, he can add files, or copy files, or play something). I have a symlink in my own $HOME directory to a folder in /home/shared, where he may leave stuff for me (little programs, funny pictures, lyrics to a song I was talking about two days ago; whatever he may have happened to pick up that he wants me to have), and of course the shared folder on his computer where I may leave stuff that I've picked up for him (updates to programs, funny pictures, etc.) is already mounted in my $HOME via LinNeighborhood, so the whole point of this setup is a minimum of browsing around (otherwise, I would have set this up to be in his $HOME directory-- which he has one of, since he is a user on this PC-- but that would be a level deeper, and it's bad enough that he already has to go through 3 separate windows in Network Neighborhood to even get to my shares, as he is too lazy to make a shortcut on his desktop ).

Anyway, it's an easy setup and it works fine once Samba is configured properly on both ends, which is not a problem for you.

Hope this helps.
 
Old 05-09-2004, 07:47 PM   #8
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Well to permanently mount an smb share on boot to a specified directory you'd add the line:
Code:
//computername/sharename  /mountpoint  smbfs  auto,username=username,password=password,fmask=777 dmask=777  0  0
to your /etc/fstab file. You can then just mount it with mount /mountpoint but only as root. Or reboot and it will be mounted automatically.
 
Old 05-10-2004, 05:07 AM   #9
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Or you can let LinNeighborhood do it for you. Once you've set it up and mounted the drives, you can tell it to memorize the mounts and remount on startup, then add LinNeighborhood -m to your session startup (make a launcher in ~/.kde/Autostart or add it to Gnome Control Center=>Desktop Preferences=>Advanced=>Sessions=>Startup Programs) and that's done without the necessity of putting a username and password in a cleartext file that is the first place anybody might look. At least the LinNeighborhood data, while also in cleartext, is in a place that the inexperienced might well miss, for more than one reason (hidden folder, not in /etc/, and since after the first time you use it there's no need to use it again, there's probably no big honkin' shortcut to the program on your desktop/panel, and said inexperienced hacker may not even think to look for the config files for it in the first place).

It isn't much, but it's a small security benefit, imo.
 
Old 05-10-2004, 05:50 AM   #10
adz
Senior Member
 
Registered: Jun 2003
Location: Sydney
Distribution: Debian, FreeBSD
Posts: 1,713

Rep: Reputation: 53
Quote:
Originally posted by motub
... and that's done without the necessity of putting a username and password in a cleartext file that is the first place anybody might look.
You can change the permissions of fstab to make it readable by owner/group only or you can specify the "credentials=/path/filename" and have the filename (un)readable by whoever you want.
 
Old 05-10-2004, 06:35 AM   #11
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Yes, of course... but my point was that if somebody gained access to your system, /etc/fstab is a very well-known configuration file, and there's a useable Windows username and password right there in cleartext, so now the unauthorized user has possible access to additional machines, depending on the security setup of the Windows box.

You have to do somewhat more searching to find the LinNeighborhood configuration (if said unauthorized user knew to look for it at all) and gain that information. It can still be done, without question, but it's a bit harder. And in securtiy matters, I'll take any advantage I can get.
 
Old 05-10-2004, 09:53 PM   #12
RottenMutt
Member
 
Registered: Jul 2003
Location: dfw
Distribution: Latest Fedora Release
Posts: 195

Original Poster
Rep: Reputation: 31
i was able to type smb://computer_name/share_name and then it prompted me for my password... i then saved it as a bookmark.

still can't get the network services to work...
 
Old 05-11-2004, 03:48 AM   #13
thanquol
Member
 
Registered: Aug 2003
Location: Northern Sweden
Distribution: Fedora Core 3
Posts: 52

Rep: Reputation: 15
Hi!

I'm having the same problem!

Background:
I'm running FC2-test3, connected to a M$-network
Before I was running FC1 with successful connection to the services.

I'm using this syntax to connect as root:
# smbmount //CIFSservername/sharename /home/thanquol/hem/ -o username=username/domainname%password,uid=thanquol,rw,fmask=777,dmask=777,debug=4

(the thing with fmask and dmask doesnt make any difference) following message (from debug-option):
mount.smbfs started (version 3.0.3-5)
added interface ip=10.5.10.7 bcast=10.5.255.255 nmask=255.255.0.0
resolve_lmhosts: Attempting lmhosts lookup for name "servername"<0x20>
getlmhostsent: lmhost entry: 127.0.0.1 localhost
resolve_wins: Attempting wins lookup for name "servername"<0x20>
resolve_wins: WINS server resolution selected and no WINS servers listed.
resolve_hosts: Attempting host lookup for name "servername"<0x20>
Connecting to 10.7.1.77 at port 445
25927: session request ok
Serverzone is -7200
25927: session setup ok
25927: tconx ok


when I try to make 'ls', I get following message (after a timeout):
ls: /home/thanquol/hem/: I/0-error

umounting the share, and trying another command:
# smbclient //CIFSservername/sharename --user username%password --workgroup domainname -L

works fine and gives me this result:
Domain=[DOMAINNAME] OS=[Windows 5.0] Server=[Windows 2000 LAN Manager]
smb: \> ls (gives me this result)
. D 0 Fri Apr 30 13:42:29 2004
.. D 0 Fri Apr 30 13:42:29 2004
.Trash-thanquol D 0 Thu Mar 4 15:55:38 2004
Absolut D 0 Thu Mar 4 15:35:25 2004
Arkive file OutLook D 0 Sat Dec 6 19:39:37 2003
BACKUP D 0 Sat Dec 6 19:39:44 2003
BVADMIN D 0 Sat Dec 6 19:39:44 2003
dok DR 0 Mon Apr 5 16:21:09 2004
download D 0 Wed Apr 21 12:09:01 2004
outlook.pst 32768 Mon Apr 5 16:23:22 2004
PC D 0 Mon May 10 14:43:14 2004
Pivot D 0 Sat Dec 6 19:45:21 2003
PUTTY.RND 600 Mon Apr 5 17:43:48 2004
TEMP D 0 Sat Jan 17 02:08:39 2004

51199 blocks of size 4194304. 11977 blocks available

# smbclient -V
Version 3.0.3-5


Whats wrong, why cant I mount the share readable?

Last edited by thanquol; 05-11-2004 at 03:53 AM.
 
Old 05-11-2004, 07:50 AM   #14
motub
Senior Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Gentoo (main); SuSE 9.3 (fallback)
Posts: 1,607

Rep: Reputation: 46
Offhand... and possibly way off-base-- is this an NTFS partition? Do you have NTFS read support enabled in the kernel? The whole point of mounting is that the drive is then considered part of the regular file tree, so if support for that filesystem is not enabled, it won't be readable.

Just an idea, hope it helps.
 
Old 05-12-2004, 09:28 AM   #15
thanquol
Member
 
Registered: Aug 2003
Location: Northern Sweden
Distribution: Fedora Core 3
Posts: 52

Rep: Reputation: 15
Hi!

I have now compiled ntfs suport into the kernel, and restarted.

Mounted as usual with:
# smbmount //CIFSservername/sharename /home/thanquol/hem/ -o username=username,domain=domainname,uid=thanquol,rw

the mount works out fine, but the same problem occures:
when I try to run 'ls', I get following message (after a timeout):
ls: /home/thanquol/hem/: I/0-error

any more ideas of what I can do to make the share readable?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Can't install "glibmm" library. "configure" script can't find "sigc++-2.0&q kornerr Linux - General 4 05-10-2005 02:32 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? munkey Linux - Newbie 3 05-03-2004 04:30 PM
Couldn't display "SMB:///" , No host "(Null)" could been Found?????? help munkey Fedora 6 04-30-2004 06:04 PM
"X-MS" cant open because "x-Multimedia System" cant access files at "smb&qu ponchy5 Linux - Networking 0 03-29-2004 11:18 PM
i just finished typing "./configure" and "make" in mplayer directory... kublador Linux - General 4 02-22-2003 03:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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