Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
first off, let me say that I have never used samba before (if that is what I am supposed to be using) here is what I want to do... I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Enthusiast
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    556

    samba configuration


    first off, let me say that I have never used samba before (if that is what I am supposed to be using)

    here is what I want to do...

    I have two computers:

    1 - win xp pro and red hat 7.3 - hda1=win xp pro, hdb1= fat32 with mp3's on it, hdb2+= rh 7.3
    2 - suse 8.1 on one 30G hd

    basically I want to be able to share my mp3 files and a couple of folders on windows with suse. I don't care about sharing them with my red hat install since I have both of those drives mounted using fstab.
    I don't wanna turn a computer into a server - they are all workstation systems.

    I was told I should do this thru samba. Is this the best/easiest way?
    How can I do this?
    I have already set things up in windows, and have designated the folders I would like to share as such.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Indeed, it is Samba you will want to use. Windows uses a protocol called SMB (Server Message Block) for file sharing, domain logins, name lookup, etc., etc. Linux, of course, doesn't implement that protocol natively, so it needs external programs to implement it. That is where Samba comes in.

    Samba consists of two major parts; the server and the client.
    The server part consists of smbd and nmbd. nmbd implements the NMB sub-protocol of smb, which is used for name lookup, and smbd implements the main SMB protocol, used for file sharing etc.
    The client parts has several parts, for example smbclient, smbmount, nmblookup and winbindd. smbclient is a command line tool, like the ftp command line tool, that will allow you to access file and printer shares on other computers. I don't really know what smbmount is good for, since you can just as well use mount -t smbfs. Anyway, if you run eg. "mount -t smbfs //winbox/share /mnt/smb -o username=dolda2000", you get a Windows file share mounted on you local system (OK, I lied a bit when I said that there was no SMB support in the kernel). See smbmount(8) for more mount options.
    nmblookup will allow you to do NMB queries on the network. If you run winbindd and add a entry for the hosts line in your /etc/nsswitch, you will be able to do NMB hostname lookups "natively", ie. the gethostbyname() call and related calls will be able to resolve NMB names. That means that you can run eg. "ping winbox", where winbox is not added to you /etc/hosts and you don't have it in a DNS.

  3. #3
    Linux Enthusiast
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    556
    ok, so last night I did some work on this and was able to mount my shared folders, so now I want to know how to put that in my fstab.

    here are my mount commands that work:

    smbmount //mainframe/music /mnt/mainframe/music
    smbmount //mainframe/movies /mnt/mainframe/movies

    now, i wanna know how to add these so they mount automatically.
    i am thinking that i will need to add them to my fstab as usual

    so...

    mount -t smbfs //mainframe/music /mnt/mainframe/music -o

    (it doesn't ask me for a username, but it does ask me for a password to which i just press enter and then i can get in - so how would i configure that?)

    thanks for the input

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    No, that's right, it doesn't ask you for a username. By default, it uses your login name, but you can specify it with with mount option username, like I showed you in my previous post. I'm not sure what you have done there, though. Why do you have a -o without any options?
    Adding them to your fstab is nothing but standard. Look at this example line:
    Code:
    //mainframe/music /mnt/mainframe/music smbfs username=yowwww,password=secret 0 0
    See smbmount(8) for the complete list of mount options.

  6. #5
    Linux Engineer
    Join Date
    Apr 2003
    Location
    Sweden
    Posts
    796
    Hey

    Watch on this howto for samba configuration.

    http://www.utterberg.com and under the howto-section.

  7. #6
    Linux Enthusiast
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    556
    No offense, but I am really sick of looking at webpages and how-to's and other guides with billions of pieces of information that I will never ever need.

    For at least four days now, I have been searching the net, asking people and reading tons of stuff and the solution was so EASY and there is all of this unnecessary information.
    All I am trying to do is see my files from one computer to the next. I don't run a multi-billion dollar company, I am not a network administrator, I don't wanna set up a huge network either.

    I don't understand why when I ask something, people have to just pass the buck off to a site or a how-to or to man pages. Then I have to sift thru a whole ton of stuff that I don't want and mostly the stuff is written in a meandered hap-hazard way that people can't understand anyway.

    It was for reasons like this that I wrote my own guide that is actually easy to follow and makes sense.

    Sorry for the outburst but after three or four days of being told a bunch of b.s. and all the time I knew that the answer was easy (I just didn't know what it was), it gets irritating.

    Dolda's information was probably some of the most useful because he actually gave an example, others just throw me to a website that makes no sense or write a ton of useless gibberish. I am not saying I am ungrateful for help when I need it, but let's keep things simple and clear when they don't need to be unnecessarily complicated.

    So...

    first off, the reason why I didn't put anything past the "-o" was because I didn't know how to finish it - that's why I explained the part about the username and password.

    which username do I use - the one on my windows box or the one on my suse box? I am thinking the windows one, but I wanna be sure.

    when you put password=secret (does that mean that it will bypass it or did you just put that in place of "*****" to show that I will use whatever password I have? What if there is no password like I already stated?
    my username on the windows box is "User"

  8. #7
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    The username that you specify in the mount options is the one that gets sent to the Windows box for login, so I'd say you had better use the Windows user name. Even if you don't have a password, you'll still have to specify it (using just "password="); otherwise it will still ask you. So basically, you'll just want to use this:
    Code:
    //mainframe/music /mnt/mainframe/music smbfs username=User,password= 0 0

  9. #8
    Linux Enthusiast
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    556
    ok, so I need to run smbclient and make a password thru there? and that only affects smbclient right and has nothing to do with windows, correct?

    so, while in smbclient:

    password=password

    so then it would be:

    //mainframe/music /mnt/mainframe/music smbfs username=User, password=password 0 0

    is that right then, given that the password is set as password?

  10. #9
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Hmmm? What does smbclient have with this to do? I didn't mean that you had to set a non-empty password, I just meant that you'll have to specify to smbmount what password to use, even if it is empty.
    The username and password specified in the mount options are those sent to Windows for authentication, so they do indeed have with Windows to do, not just with the Samba clients.

  11. #10
    Linux Enthusiast
    Join Date
    Feb 2003
    Location
    Ontario, Canada
    Posts
    556
    now I am confused again

    I am just trying to figure out what my fstab entry would be is all.

    my username for that windows box is "User" and there is no password.

    so I just wanna figure out how to set up that entry.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •