Linux Newb

Discussion in 'Computers and The Internet' started by hummblebee, Oct 20, 2006.

  1. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    Okay, well I'm getting there, slowly but surely! My internet connection got screwed up last night, and that definitely slowed me down... I have it set up again to where both computers see each other. I can browse the shared xp files from here, and the xp machine can not only see this one, but even enter into the top-level directory of the computer (enough to see the name of the shared folder - I just can't open that folder. The link that raysun provided did prove very helpful before my connection went down. I used those instructions to edit the smb.conf to get this far. I'm not sure, though, about a few of the thngs mentioned there - adding samba users, messing with the dhcp/static ip (it seems like this could mess up my internet? Then again I could be WAY off there) and the instructions on mapping a network drive in windows (seems like this would be pointless, seeing how I already can see the computer and the folder, just don't have the permissions set to access it)

    Columbo, what you said about adding a user sounds right, but should it be from the "system>administration>users and groups" menu or should I add a samba user like in the instructions on that how-to page? Part of the issue here is that the xp machine is set up NOT to log in. it's set up as a single user machine with no password. Is there a way to set the password as blank? The firewall is all turned off, so that shouldn't be a problem...

    Here is a copy of my smb.conf file, in case you see any probs with it...I know it's long, I left a bunch of the lines in there "commented" in case I end up needing them later, and I thought they might be useful for you to see...
    As always, any insight will be appreciated! This is definitely hard, bu I think I'm getting there! (at least, I'm farther along than I have been yet!) :D
     
  2. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    Its very interesting doing this it enablesd me to put my memory and resourcefulness to the test
    Ok I believe this will get you going but will not password protect the directory. Its the password protection thats the problem your first analysis was right but also what was wrong was that netbios names are always written in uppercase - a convention that allows windows to discern between a fully qualified name and a shortened netbiosname

    - bearing in mind you
    should enable the guest account where you edit users in the control panel
    on ubuntu and rename the parameter below for the guest
    account to match what the actual ubuntu guest account is named
    change these samba conf areas (global and media) to this
    also alter the path to the media folder in the section

    [global]
    security = share
    guest account = smbguest
    netbios name = ICCULUS
    socket options = TCP_NODELAY IPTOS_LOWDELAY
    workgroup = HOME

    [media]
    guest ok = yes
    guest only = yes
    path = /path to folder called media
    read only = no

    to test it - open a command prompt in xp
    and type \\ICCULUS\media then hit enter
    and with a bit of luck you should get in
    also I found this for you -
    its the unofficial guide howto for samba and is
    reckoned to be the simplest guide to setting up samba
    if the above doesnt get you started look there-
    http://www.oregontechsupport.com/articles/samba

    if you need logon security we can sort that out later
     
  3. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    Okay, I fixed the netbios name and all that from what you recommended. I started a new user account in ubuntu, and set the "guest account" parameter to that name. I got all that fixed, saved the file, restarted Samba, and now the "media" folder shows up in "my network places" in xp. BUT, I still can't access the folder. ot on either machine, going through the network. From xp it says "The network path was not found" in the command prompt, and if I try to open it from the network places or the "run" command It also tells me that I do not have permission. Do I need to create a samba user account as well? Do I need to add a password to my xp account that would somehow translate as the correct user/password to access the shared folder?
     
  4. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    now we have to give permission to the ip address of your xp machine and to users coming in from the xp box

    I just realised i need to know the ipaddresses and subnet mask
    you use because
    in the [media] section you should put a parameter saying
    hosts allow =

    after the equals sign put the address range you are on - so if your address is
    192.168.0.2 on the xpbox - you will make the hosts allow like this
    where xxx etc = ipaddress and sss. etc = subnet mask
    hosts allow = xxx.xxx.xxx.xxx/sss.sss.sss.000
    using the subnet range for your network - hmmm try either of these in this order now dependent on ipaddress and subnet mask


    hosts allow = 192.168.0.2/255.255.255.0

    hosts allow = 192.168.0.0/255.255.255.0

    that second one says allow all computers in the range 192.168.0.1 - 255
    have access and the firs one says only allow .02 access

    edited in after
    if you are using dhcp then try the second one first - but if your ip addresses are static then use the first one first
    if you dont know the ipaddress open a command prompt on the xpbox and type ipconfig /all

    forgot to say if your ipaddress looks like this
    192.168.99.2
    then hosts allow looks like this

    hosts allow = 192.168.99.2/255.255.255.0
    or
    hosts allow = 192.168.99.0/255.255.255.0
     
  5. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    All right, now we're really getting somewhere. I'm using dhcp so I tried the second one, put the line in and all that jazz. Now when I try to access that folder from xp it gives me the same error saying I don't have permission to view this network source, but at the end instead of "Network path could not be found" it says "The user name could not be found"
     
  6. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    OK glad to hear that
    This really is the tricky bit now - when its so close you forget a minor detail and so I need a coffee - gimme 10 mins I been on this computer 18 hours straight today
     
  7. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    lol, thanks for all your help man! I'm so close I can feel it! :D
     
  8. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    ok try this in the [media] section

    force user = guest

    and in the [global] section
    put

    null passwords = true

    and if that doesnt work then I need to think a little longer
     
  9. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    ha I didnt see this - LOL I know that feeling well - and you know what - I live for that feeling that last tantalising hour of these logical puzzles where you can feel that success but you cant yet touch it - its always the bit where inspired genius gets dragged out of people and into their computer
    the rest was hard slog but the next bit will make you feel like you achieved something - yeah this is the art now - the rest was a bit of science
     
  10. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    ^^ I hear that. I can really see what you meant by this being a sort of art form, too, now! :D

    It's still giving me that same user name error. the "null passwords" line was already in there. I put that force user line in - should it read "guest" or should it be the user name I set up? And upper or lower case? (Is there some blanket rule to use here? It seems like a lot of code here is case sensitive, but I can't tell outright if things should be all upper or all lower) Along the same lines, should the guest account under the [global] section be in upper or lower (right now it's all upper)? In any case, I think I've tried about every combo imaginable... :)
     
  11. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    it should read guest
    and generally only the netbiosname is in uppercase however there are cetain times when other things are in uppercase - can you just repost the smb.conf file so I can see how it stands now as we are really close
     
  12. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    Here it is.... I fised the caps issue and still get the same user name error.
     
  13. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    Try this - should work - cant see why it wouldnt

    ok everything in red bold type = comment this out by putting a ; infront of it like in [global] ;general server settings
    everything in blue = put this in to the config file
    and everything in black means leave it alone

    [global]
    ; General server settings
    netbios name = ICCULUS
    guest account = fizzgig
    server string = Linux Box
    workgroup = HOME
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY

    passdb backend = tdbsam
    encrypt passwords = yes

    security = share
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast


    wins support = no

    printing = CUPS
    printcap name = CUPS

    syslog = 1
    syslog only = yes

    ; 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
    browseable = yes
    guest ok = yes
    read only = yes
    write list = root
    create mask = 0664
    directory mask = 0775

    [printers]
    path = /tmp
    printable = yes
    guest ok = yes
    browseable = no

    ; Uncomment if you need to share your CD-/DVD-ROM Drive
    ;[DVD-ROM Drive]
    ;path = /media/cdrom
    ;browseable = yes
    ;read only = yes
    ;guest ok = yes

    [media]
    guest ok = yes
    guest only = yes
    hosts allow = 192.168.10.0/255.255.255.0
    path = /home/icculus/media
    browseable = yes
    read only = no
    guest ok = yes
    create mask = 0644
    directory mask = 0755

    force user = guest
     
  14. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    ah I made a mistake -
    I forgot to sey guest ok = yes in [media]
    also I didnt see that you said guest account = fizzgig
    that actually has to remain like this

    guest account = guest

    but check that by looking through what accounts are on the linux box sometimes its called smbguest or sambaguest Its actually an account defined by linux and has strict security methods attached to it - you also have to enable that guest account usually with a tick in a box somewhere in the
    users and groups control panel
     
  15. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    Did that, still have the same error. I also noticed just now that in [media] it had said "guest ok = yes" and then a few lines down "guest ok = no". I took out the "no" line and tried again, still the same error. If the code looks all good, maybe I messed up somehow with the account? Was it supposed to be a regulat user account or is there some way I can differentiate it as a guest account or a remote account? Or do I need to add a Samba user like that other instruction page said?

    And Columbo, if I'm keeping you up or anything don't worry about it! I'd rather wait than know that I'm making you suffer so that I can share files over my network! :p You rock!
     
  16. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    just saw this after that last post, lemme try again....
     
  17. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    Okay, I had thought before that I had to add a regular user with the name I use under xp. So I'll scrap that one.... but I can't find the guest account in the users and groups panel (or sambaguest or smbguest). I'll google it an see if I can come up with something.
     
  18. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    I gotta admit that in about 1/2 hour I must sleep
    but were ok till then - oh and I dont know whether geeks rock - do they ?
    If I thought anyone thought I was cool it may blow my geek cred LOL LOL

    http://www.hummblebee.com/

    wow do you make this stuff - its excellent !!
     
  19. Columbo

    Columbo Senior Member

    Messages:
    1,375
    Likes Received:
    1
    Ah stay tuned to this exact post I have important one to send you now
    hang on a few mins

    ok find the file that is here

    /etc/passwd

    and add this line

    smbguest:x:98:98:Samba Guest Account:/dev/null:/bin/false

    now find the /etc/groups file
    and add this
    smbguest::98:

    now at the command prompt in linux
    type this
    chown -R smbguest:smbguest /home/media
     
  20. hummblebee

    hummblebee hipstertist.

    Messages:
    2,158
    Likes Received:
    2
    I do make that stuff (and, to be honest, it's what I should have been doing all day instead of tinkering with this network, but I think it'll just be a late night instead...) Where do you live? Maybe I could send you a little somethin' somethin' for all your help! :)

    Okay, I've changed that parameter to "guest" from "fizzgig". I also scrapped that user account since it didn't seem to be good for much. But I still can't figure out how to activate the guest account for samba. From what I've found online so far, it has something to do with the file smbpasswd ? I tried looking at that file (sudo gedit, but I didn't make any changes) and it has "fizzgig" in it still. I'll switch computers and paste it in here....
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice