Samba server with two XP boxes
Results 1 to 5 of 5

Thread: Samba server with two XP boxes

  1. #1
    Custom User
    Join Date
    Oct 2001
    Posts
    503

    Samba server with two XP boxes

    Firstly, apologies if this isn't in the right forum, but I figured it was at least a bit security related.

    Here's what I want to do:

    I would like to set up the share in such a way that people on other computers on the network can access a remote hard drive and use it just like it was a local hard drive without having to enter usernames/passwords, etc. I realise that this is a possible (large) security hole, but there's not a lot I can do about it because of the fact that my mum and dad are going to be using it.

    Here's what actually happens:

    I've got a usb external hdd attached to a box running debian. I have one computer running Win XP Professional and one running Win XP Home. I've been having problems with them for ages since even though they say they are both on the same workgroup and file and printer sharing is enabled (apparently) on both boxes, the Professional box can't access a printer which is attached to the Home box (or at least I get it working for a while and it suddenly stops working for no apparent reason i.e. I haven't made any changes to any of the settings on either box).

    At the moment I've got a samba share running on the debian box which allows the two XP boxes to see the hdd, but they don't seem to have write access. I've looked at the permissions and sure enough there's no group and "world" write permissions, but performing a chmod even as root doesn't seem to alter this. I realise this is probably easy to solve, but I just don't have a clue (I'm more of a programmer than a sys admin).

    Here's my smb.conf file:
    Code:
    [global]
    	workgroup = MSHOME
    	security = SHARE
    
    [philips]
    	path = /mnt/usbhd
    	read only = No
    	guest ok = Yes
    And if it's of any interest to you I've been using SWAT to configure samba since when I was editing smb.conf by hand it didn't seem to work (not that there's any change now )

    Also, although it says in the config above that the workgroup is MSHOME, when I check that with smbclient, apparently the workgroup is WORKGROUP and not MSHOME. Weird.

    Anyhow, I can give you any more information as you need it. Thanks in advance,

    ac

  2. #2
    Senior Member
    Join Date
    Aug 2003
    Posts
    185
    mount a folder of the usbhd into the default public shared folder
    e.g. /home/shared/usbhd
    and put something like the following into the smb.conf:
    [sharedusbhd]
    comment = Public Shared USBHD
    path = /home/shared/usbhd
    browseable = yes
    guest only = yes
    writable = yes
    public = yes

    ## in my opinion it should work ...but i do not know whether it's secure or not
    Industry Kills Music.

  3. #3
    Master-Jedi-Pimps0r & Moderator thehorse13's Avatar
    Join Date
    Dec 2002
    Location
    Washington D.C. area
    Posts
    2,884
    The single biggest issue people have with SAMBA is creating the proper perms. There are books written on this topic.

    Have a look at this page. It will solve your issue.

    http://www.informit.com/articles/art...?p=359432&rl=1

    It is an advertisement for a SAMBA book, but the info you seek is within the text on the page.

    --TH13
    Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
    Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden

  4. #4
    Custom User
    Join Date
    Oct 2001
    Posts
    503
    Thanks a lot for all the replies - I've finally got it working (and yes, it was to do with permissions).

    I had it set up so that anyone who accessed the share was using the guest account on the machine, but what I forgot about was the fact that I mounted the drive as my normal user account. That's why I was getting all the errors about not having the permission to write to the drive.

    I was just thinking about the replies I'd got and what people had been saying when it suddenly struck me what the problem was. I was thinking to myself about why I couldn't alter the permissions of the drive using chmod (or at least of the mount folder) and I realised how much of an idiot I was being.

    I'll hopefully get round to setting up some kind of firewall on the machine hosting the share because at the moment AFAIK there are really no access restrictions on it so it's basically open to whoever wants to use it (not that it should really matter since my router's not forwarding the samba port but...).

    [edit]One thing that I still don't get is why my workgroup is still coming up as WORKGROUP when it's quite clearly set to MSHOME in smb.conf (not that I particularly care since it's working). Also, I can't figure out why my two win xp boxes refuse to communicate with each other despite the fact they're in the same workgroup and file and printer sharing is allegedly enabled. I have a printer which is shared by the XP home computer but the professional one can't seem to access it (in fact the two computers both seem to think that their respective "counterpart" is constantly disconnected or something).[/edit]

    Thanks again,

    ac

  5. #5
    Master-Jedi-Pimps0r & Moderator thehorse13's Avatar
    Join Date
    Dec 2002
    Location
    Washington D.C. area
    Posts
    2,884
    One thing that I still don't get is why my workgroup is still coming up as WORKGROUP when it's quite clearly set to MSHOME in smb.conf
    You mentioned you were using SWAT (I always display the advanced config menus, you should too). Make the change there and see what happens.

    Also, I can't figure out why my two win xp boxes refuse to communicate with each other despite the fact they're in the same workgroup and file and printer sharing is allegedly enabled. I have a printer which is shared by the XP home computer but the professional one can't seem to access it
    Check and see of NetBIOS over TCP is enabled
    Check and see if the XP firewall exceptions are in there for file sharing
    Check and see if File and Print Sharing for MS networks is bound to the NIC(s) in use.
    Check and see if these hosts can actually see eachother on the LAN using PING, then nslookup by hostname.
    Are you actually sharing any folders?
    What happens when you attempt to access the other XP host when doing this:
    \\IP Address of target host\c$
    Drop to a command prompt and type: net view /domain
    Tell me what it reports on each host.
    Also do a: net share on each host.

    Give me the answers and we can see what the problem is.

    --Th13
    Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
    Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden

Posting Permissions

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