Announcement

Collapse
No announcement yet.

Which Username and Password To Use For Samba? (Solved)

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

    Which Username and Password To Use For Samba? (Solved)

    I have read, and read, and read all the wiki's and tutorials regarding setting up Samba so please just let me ask a direct question;

    Which username and password is Samba looking for when I connect to my Linux share from my XP machine?

    Here are some stats:

    Computer #1
    Win XP Pro SP2
    Wireless Access (Static IP)
    username (at bootup) = superm
    password (at bootup) = wonderw

    Computer #2
    Kubuntu 7.10
    Wireless Access (Static IP)
    username (at bootup) = batman
    password (at bootup) = robin

    I setup a user account for "superm" in Samba but, like most folks, can not get full access to the files. So, which password is Samba looking for? Is it reading the password from my XP machine?

    Thanks

    m
    sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

    #2
    Re: Which Username and Password To Use For Samba?

    In the Samba directory on your Linux box is a directory called bin. In that directory is an executable named smbpasswd. Run './smbpasswd -U <username>
    That will prompt you for a password to be entered twice. This is the credential that you'll use on your remote system, Windows or other, to log onto the Linux server.
    I recommend that you use your Windows userID and password since Windows (XP Pro, at least) uses your Windows logon credentials as the default when logging onto Samba.
    This is my first reply to a question so criticize gently. I'm a noob here.

    Comment


      #3
      Re: Which Username and Password To Use For Samba?

      So your saying that I should use the same username and password for the samba server as I do for Windows? In this case:
      username (at bootup) = superm
      password (at bootup) = wonderw


      I'm really confused. What about those individual user accounts that I setup? Those passwords have to be different. Right?

      And...When I try to log onto the Linux machine using Windows XP, does Windows send the username and the password to Samba based on the Windows Account I am using? For example, If I'm on WinXP and logged into that WinXP account (at bootup) as
      username (at bootup) = superm
      password (at bootup) = wonderw
      does WinXP automatically send that username and password to Samba? And is that the Samba password I should be using for all accounts?

      sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

      Comment


        #4
        Re: Which Username and Password To Use For Samba?

        Ok...some progress here. From my WinXP machine I can open Explorer>My Network Places>Entire Network>Microsoft Windows Network>Mshome>Linuxshares. Under Linuxshares I see my shared folder (MyDocs), "homes", and "Printers and Faxes". I can not browse into the folders under MyDocs or "homes" but I can print from WinXP to my printer which is connected to my Linux computer and visible under >Linuxshares>Printers and Faxes.

        So, I feel like I'm getting close. The error message I get when trying to browse is:

        "\\Linuxshares\Mydocs is not accessible. You might not have permission to use the network resource. The network path was not found."

        Here is my smb.conf file.
        [global]
        ; General server settings
        netbios name = Linuxshares
        server string =

        announce version = 5.0
        socket options = SO_KEEPALIVE TCP_NODELAY IPTOS_LOWDELAY SO_SNDBUF=8192 SO_RCVBUF=8192

        passdb backend = tdbsam
        null passwords = yes
        username map = /etc/samba/smbusers
        name resolve order = hosts wins bcast

        wins support = yes

        printing = CUPS
        printcap name = CUPS

        syslog = 1
        syslog only = yes
        security = share
        restrict anonymous = no
        domain master = no
        preferred master = no
        workgroup = Mshome
        max protocol = NT
        acl compatibility = winnt
        ldap ssl = No
        server signing = Auto

        ; NOTE: If you need access to the user home directories uncomment the
        ; lines below and adjust the settings to your hearts content.
        ;[homes]
        ;valid users = %S
        ;create mode = 0600
        ;directory mode = 0755
        ;browseable = no
        ;read only = no
        ;veto files = /*.{*}/.*/mail/bin/

        ; NOTE: Only needed if you run samba as a primary domain controller.
        ; Not needed as this config doesn't cover that matter.
        ;[netlogon]
        ;path = /var/lib/samba/netlogon
        ;admin users = Administrator
        ;valid users = %U
        ;read only = no

        ; NOTE: Again - only needed if you're running a primary domain controller.
        ;[Profiles]
        ;path = /var/lib/samba/profiles
        ;valid users = %U
        ;create mode = 0600
        ;directory mode = 0700
        ;writeable = yes
        ;browseable = no

        ; NOTE: Inside this place you may build a printer driver repository for
        ; Windows - I'll cover this topic in another HOWTO.
        [print$]
        path = /var/lib/samba/printers
        guest ok = yes
        write list = root
        create mask = 0664
        directory mask = 0775

        [printers]
        path = /tmp
        printable = yes
        guest ok = yes
        browseable = no
        printer name = HPDeskjetF4180
        comment = Kubuntu Printer

        [MyDocs]
        case sensitive = no
        strict locking = no
        guest ok = yes
        msdfs proxy = no
        comment = Kubuntu Home Direcotry
        path = /home/MyDocs


        sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

        Comment


          #5
          Re: Which Username and Password To Use For Samba?

          I don't see a [homes] section in your smb.conf file.
          Try:
          [homes]
          path = /home
          browsable=yes
          writable=yes

          I'm a Samba user at work so I don't have visibility into more files.

          Your smb.conf seems complicated. Our config file has no more than five lines per section.

          Keep working on it and good luck.

          Comment


            #6
            Re: Which Username and Password To Use For Samba?

            Thanks for the reply. I copied and pasted that smb.conf from one of the many posts that I read. Actually, that one came from the "How To" on the Ubuntu site. I'll try your tip and see what happens.

            Could it be possible that AppArmor is blocking my connection from WinXP? I just recently learned that AppArmor is installed by default in Kubuntu / Ubuntu. I've never even configured it and I really do not know that much about it. I assume it is a firewall.
            sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

            Comment


              #7
              Re: Which Username and Password To Use For Samba?

              Originally posted by gocoder
              I don't see a [homes] section in your smb.conf file.
              Try:
              [homes]
              path = /home
              browsable=yes
              writable=yes

              I'm a Samba user at work so I don't have visibility into more files.

              Your smb.conf seems complicated. Our config file has no more than five lines per section.

              Keep working on it and good luck.
              It worked!

              But, let me say that part of the problem was my misunderstanding of Samba shares. I had previously shared the Homes folder. Doing so makes ALL the folders under the Home directory viewable and browseable (based on your settings). So, I had created the Homes share in my smb.conf file then, like a good boy, went to my WinXP machine and tried to map a drive to the /home directory. This is where I made my mistake!

              When setting up Samba, I created a user "mrmsu" which Samba placed under the home directory as "/home/mrmsu". Samba was giving me access to /home/mrmsu and NOT to /home. I should have mapped my WinXP machine to /home/mrmsu and NOT to just /home as I thought I should.

              I discovered this in an act of desperation - I created another mapped drive to the /home/mrmsu folder and it worked!

              So, all you confused Samba users out there, when you share your Home directory on your Linux machine with your local network and you wish to map an XP machine to that folder, do not map to the /home directory that you shared. Map to the /home/<your_username_created_by_samba> folder and you should be good to go!

              M
              sudo make me rich<br /><br />Kubuntu Gutsy 7.10<br />KDE 3.5<br />Compaq Presario 5000<br />Intel Celeron 1.2 Ghz<br />512 Ram, Riva TNT2 Video Card<br />All the above hardware is 7 year old junk but<br />Linux runs great on it.&nbsp; :&gt<br />Ham Radio Rules

              Comment

              Working...
              X