Announcement

Collapse
No announcement yet.

[Fixed:] Can't Access Kubuntu Shares from Windows

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [Fixed:] Can't Access Kubuntu Shares from Windows

    I have three PC's in a small, home peer-to-peer network.  For discussion, lets call my workgroup STOOGES, and my three PCs are

    CURLY - running Ubuntu Dapper
    LARRY - running Windows XP, SP 2
    MOE - running Kubuntu Dapper, just installed.

    The problem is configuring the Kubuntu PC (Moe) so that the Windows PC (Larry) can access it.  I need bi-directional read-write access without prompting for a password.  (It's just me on these machines, so security is not an issue, and the firewall keeps out intruders).  No matter what options I set, either in KControl, or hand-editing smb.conf, I can't get a configuration that works, meaning, allow access to the Kubuntu machine from the Windows XP machine - with or without a password .. 

    All three machines see each other and their shares, so I'm part way home; the ethernet cards are setup properly, and working.  Just no write access ..

    Two somewhat unusual circumstances:

    1) The two Linux machines communicate fine.  At first request for access, I have to enter a user name and password, but I then have access for the rest of the session.  Not as good as I'd like, but I'll live with it.

    2) No matter what I do on the Kubuntu box, I can't add Samba users.  The Kcontrol module has been broken in the last three distros I've tried.   If I type sudo smbpasswd -a $USER where $USER is a valid account that exists and is enabled, the program prompts for a password, but nothing is written to /etc/samba/smbpassword.  The password file does not exist. 

    Can someone point me to an FAQ, an online doc, or post a sample smb.conf fragment that will help? 

    TIA ..


    #2
    Re: Can't Access Kubuntu Shares from Windows

    Hi sonofmoog,

    I've been wrestling with Samba for the past week myself, and while I still have a lot more to learn, I believe that I have stumbled on the problem that you are having. One thing I noticed was that when Samba has the directive

    passdb backend = tdbsam

    in it, the passwords don't seem to work - at least for me. So I changed it to

    passdb backend = smbpasswd

    which appears to be the default, and the /etc/samba/passwd is created properly.

    I am also struggling with the "read only" (aka "writable") flag. I have found that I can change it using the swat front end, but I'm also using it in a professional environment, and I don't want everyone to need root access (nor do I want to have to update everyone's share to allow write access). The solution I have recommend to management is to use the "homes" share. (Below I included a snippet of the man page that describes "homes.") In short, I simply added

    [homes]
    Comment = Home Directories
    read only = no

    to my /etc/samba/smb.conf file. The home section allows /home/* to be shared. So if your Linux account ID is "sonofmoog," you can log in through Windows to Samba using "sonofmoog." As long as you have issued the "smbpasswd -a sonofmoog" command, it should work for you. Also, this way, you don't need to establish an actual share in /etc/samba/smb.conf for any /home/* directory.

    Hope that helps, and good luck!

    ----------
    from "man smb.conf:"

    The [homes] section

    If a section called [homes] is included in the configuration file, services connecting clients to their home directories can be created on the fly by the server.

    When the connection request is made, the existing sections are scanned. If a match is found, it is used. If no match is found, the requested section name is treated as a username and looked up in the local password file. If the name exists and the correct password has been given, a share is created by cloning the [homes] section.

    Some modifications are then made to the newly created share:

    - The share name is changed from homes to the located username.
    - If no path was given, the path is set to the user's home directory.

    If you decide to use a path = line in your [homes] section, it may be useful to use the %S macro. For example:

    path = /data/pchome/%S

    is useful if you have different home directories for your PCs than for UNIX access.

    This is a fast and simple way to give a large number of clients access to their home directories with a minimum of fuss.

    A similar process occurs if the requested section name is "homes", except that the share name is not changed to that of the requesting user. This method of using the [homes] section works well if different users share a client PC.

    The [homes] section can specify all the parameters a normal service section can specify, though some make more sense than others. The following is a typical and suitable [homes] section:

    [homes]
    read only = no

    An important point is that if guest access is specified in the [homes] section, all home directories will be visible to all clients without a password. In the very unlikely event that this is actually desirable, it is wise to also specify read only access.

    The browseable flag for auto home directories will be inherited from the global browseable flag, not the [homes] browseable flag. This is useful as it means setting browseable = no in the [homes] section will hide the [homes] share but make any auto home directories visible.

    Comment


      #3
      Re: Can't Access Kubuntu Shares from Windows

      Thanks for the reply. I was able to fix my problem by reading the rather extensive documentation in /usr/share/doc/samba. I wound up cutting a lot out of my global section that was there for security purposes - which I don't need. So, Kubuntu is up and running, and for the moment, it is everything I need it to be. I shall file your tip on passdb backend away for safekeeping.

      Comment

      Working...
      X