Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
If you got to the ms boxes asking for a pw, you were RIGHT there. I accidentally posted an old smb.conf earlier in this thread - one that asks for a password. Here is part of my current one, which has password free shares.
Code:
[global]
workgroup = JUKEBOX_HERO
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
wins support = true
domain logons = Yes
security = share
comment = The Computer Of Kevin
server string = Kevin's Computer
dns proxy = No
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
//[Music]
//comment = Music
//inherit acls = Yes
//path = /mnt/documents/Music
//guest ok = yes
I still see what look like authorization errors trying to access any resources shared by Fedora.
I have included a redacted version of smb.conf below. It reflects my fruitless attempts at adding more and more "permissive" stuff.
Also note:
1) I do have the useradd script on my system, but when I go into the "Users and Groups" UI, I do not see "nobody" listed.
2) The file system permissions for "others" of the shared directory are set to create/delete (which I assume also allows browsing)
3) Some of my previous experiments included security=user, which is when I saw the MS box prompt for a password.
4) The samba log file shows lines like:
2007/02/01 16:35:34, 0] smbd/service.c:make_connection_snum(911)
'/home/samba_user/F6_share' does not exist or permission denied when connecting to [F6share] Error was Permission denied
5) As another experiment in the Fedora desktop, I open Computer/Network/PavilionF6, and sure enought the icon for F6share is there, but when I open it, I am told that the share is not there (I am running as root), so let's check the obvious. I think that F6share is found at /Computer/Filesystem/home/samba_user/F6_share (which is what the smb.conf file reflects).
[global]
workgroup = 21prince
netbios name = PavilionF6
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
server string = Samba Server
load printers = yes
cups options = raw
log file = /var/log/samba/%m.log
max log size = 50
domain logons = yes
wins support = yes
dns proxy = no
guest ok = yes
guest account = nobody
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writeable = yes
[F6share]
comment = Shared area in home/samba_user
inherit acls = Yes
path = /home/samba_user/F6_share
writeable = yes
security = share
guest ok = yes
browseable = yes
[printers]
comment = All Printers
path = /usr/spool/samba
browseable = no
security = share
public = yes
printable = yes
i think you and I are experiencing a similar problem.
I too have fedora core 6 and till just now i was having problems accessing shares from an MS machine.
XP would display the shares on my FC6 machine, but when i tried to access one Explorer would freeze.
I think the problem has something to do with secuirty in the /home/ directory.
I've created two identical shares (same properties in smb.conf) except for their locations.
One was located in /home/lucas/ and the other in /tmp/
I still can't access the share in /home/lucas/ but i can access the one in /tmp/
I am still new to Linux, but it seems like the problem isn't in the samba configuration. Could have something to do with /home permissions.
I hope this helps.
I'll let you know if i get the share in my /home directory working.
Distribution: Currently toying with Debian-based MEPIS
Posts: 31
Rep:
Let's Go Through This Thing...
I would like to start off by saying that Fedora is the perfect tool for learning Samba, however, there are a few things that took me forever to discover when I was where you are right now. First of all: SE Linux... turn this thing off, otherwise no matter what you do, Samba will never work correctly. Secondly, I would recommend getting used to doing everything from the console right off the bat. It might sound hard right now, but once you learn a few commands, you'll love it (it's much quicker anyway). I say that because when you do everything with a GUI, like setting file permissions for example, things are so much more intimidating when you've got tons of pull down boxes, and settings you've never seen before.
Thank you for letting me rant, anyway, the first thing I would do is scrap your smb.conf (rm -f /etc/samba/smb.conf), and your smbpasswd file (rm -f /etc/samba/smbpasswd). I imagine that something there is a little screwy. I would also try deleting and adding your users back to your machine (userdel [username] & useradd [username]) because I have found that sometimes GUI tools mix things up involving passwd,shadow,gshadow files, which would make it highly unlikely that your user accounts would work anyway.
Now after you've got your users, make sure you've got the current Samba version (3.0.23c I think it is) (yum install *samba*). I don't think you need the *, that's just a habit. You should be in good starting shape. Assuming you have all of the directories that you want made we can move on... Once again remove the smb.conf file, because now the one that's there has a bunch of garbage comments that you'll never pay attention to, and make a new one (pico smb.conf). Here's a good basic setup:
[global]
workgroup = smb
netbios name = smbwork
server string = SMB server
load printers = yes
printing options = raw
[printers]
comment = These are my Printers
path = /var/spool/samba
browsable = yes
writable = yes
printable = yes
[home]
comment = User Home
path = /home/%U
browsable = yes
writable = yes
create mask = 0700
And there's something to get you started. Most of those options you had don't even need to be defined for a basic setup, usually all of the defaults are just fine. The %U is a variable that tells Samba to use the username, instead of defining hundreds of shares, or having the share as just /home, which can get messy. Create mask is telling Samba to set file permissions auto-magically, just to make things easier. Now add your users to Samba (smbpasswd -a [username]) and set the passwords.
Now for the moment of truth, start Samba (service samba start), and you should be in good shape. Try to connect using the IP address, not the name (which needs to be defined in the hosts file, otherwise there's no guarantee). If you don't know the address, go to your console and type "ifconfig" which should bring up a bunch of garble talk. You should see something like: "inet addr:" and next to that is your IP.
After all of this you should be just fine. If not I would recommend moving to FC5 instead of 6 because I've had problems from the get go with that thing. Please don't take anything I've written as rude or condescending, that's just how I sound, and I have no idea how much you are familiar with Linux or Samba, so I just wanted to cover all the basis.
MS boxes seeing the printers on the Fedora box - to repeat, the Fedora box does not show up in Network Neighborhood, nor can it be found by explicitly asking for "\\pavilionF6". In the UI "System/Administration/Printers" the printers appear as local printers, with the checkbox set for "Share this printer".
Thanks
Jonathan
I set up my aunt & uncle's home network. My aunt is running on Slackware with a Canon S520 hanging off the parallel port. My uncle was running Windows and wanted the ability to print to the printer. You have several routes you can take, but I ended up configuring CUPS on my aunt's computer. There are several changes you have to make to /etc/cups/cupsd.conf and one change to /etc/cups/mime.types. To restrict printing to only the local network, I also added an entry in /etc/hosts.allow.
You still couldn't "browse" for a printer, but if you added the correct connection information when adding a new printer in Windows, it worked just fine.
I'm not going to post my cupsd.conf here as it would be wicked long. However, if you'd like copies of the files listed above so you can see what I did, just PM me.
SELinux was all of my problems with file shares (and I think I now understand everything I had been seeing). SELinux was installed and activiated by default by the Fedora 6 distribution I used. Entering "setenforce 0" at the command line made file sharing work.
Now, for sharing the darn printers. I think I see an obvious problem with the default "smb.conf" which got installed. The [Printers] section has a command "Path = /usr/spool/samba" and when I went to check the permissions on this, I discovered that it did not exist. However, "/var/spool/samba" does exist. Does anyone know if the latter is correct, what the folder permissions need to be, and if "Browseable = no" really makes sense?
I tried the /var/spool/samba and realized that - while the XP system is seeing the printer names published by Fedora, it does not
seem to be understanding it. The printers on the Fedora box were marked as "shared" (which given the "load printers = Yes" in smb.conf is probably superfluous). There are no files in /var/spool/samba - maybe print jobqueue metadata is kept elsewhere, I have no clue.
So, let me describe what the XP side looks like when I open up "pavilionF6" (the Fedora box) in Network Neighborhood
a) icons for the file shares corresponding to folders published by pavilionF6
b) icons for the two printers locally attached to pavilionF6 - in usual XP usage, this would be where you check the print queues on pavilionF6
c) A "Printers and Faxes" folder which - when opened - shows the two printers - in usual XP usage, this is where you add remote printers to the local system's list of printers.
When I try to open the icons in (b) above, XP tells me "cannot access", but nothing is showing up in the samba error log on pavilionF6, leading me to believe that XP has no idea of how to access it. I am making the perhaps erroneous assumption that samba protocols in fact allow for communicating print queue information.
When I try to open the icons in (c) above, I once again get a "cannot access" message, but an error shows up in var/log/samba/familyroom.log:
[2007/02/02 20:46:44, 0] smbd/service.c:make_connection(1102)
familyroom (192.168.0.100) couldn't find service ::{2227a280-3aea-1069-a2de-08002b30309d}
The strange hexadecimal numbers appears to be an Windows GUID (globally unique ID)
On the XP system, I tried deleting and reestablishing the reference to the shared printer on the Fedora box. I thought this had failed as I kept seeing the "Access error - cannot connect" legend every time I tried to browse the queue. It turns out that - despite that - I actually can print.
Any learning on what is required to get the print queue mechanics working - a differnt LINUX printing subsystem.
By the way, how do I tell which subsystem is already installed? In the "Printer Configuration UI", I can click the button "GoTo Server" and the Fedora system tries (and fails) to connect to a CUPS server.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.