Page 1 of 6 123 ... LastLast
Results 1 to 10 of 53

Thread: HOWTO: Setup samba with Windows XP running as a VMWare server guest

  1. #1
    Join Date
    Aug 2006
    Location
    New Zealand
    Beans
    140
    Distro
    Ubuntu 10.04 Lucid Lynx

    HOWTO: Setup samba with Windows XP running as a VMWare server guest

    The full title of this howto should be:

    "How to setup samba peer to peer with Windows XP which is running as a VMWare server guest on a Ubuntu Dapper host to share files easily"

    Using VMWare server to run Windows programs which are not available on Linux will enable you to never have to dual boot again to run your essential Windows applications.

    To install VMWare server, follow the directions at:
    http://www.ubuntuforums.org/showthre...ghlight=vmware

    Once VMWare is successfully installed and you have Windows XP installed as a guest, you should read Stormbringer's howto at:
    http://www.ubuntuforums.org/showthre...ghlight=vmware

    This howto is very largely based on Stormbringer's work, but because I had so much difficulty in getting samba to connect to my Windows XP guest I thought some people might appreciate knowing what steps I finally used.

    If you don't use Gnome, you'll have to make a few adjustments.

    Ok, here we go...
    1)Use Synaptic Package Manager to install samba, samba-common, smbclient and smbfs.

    2)Use System -> Administration -> Shared folders to make a shared folder. I suggest you use /home/YOUR_NAME/samba. In Properties:
    a) Share with: SMB
    b) Name: MyFiles
    c) Tick Allow browsing folder
    d) In Windows sharing settings, “Domain/Workgroup” is MsHome (or whatever your guest XP machine is) and select “This computer is a WINS server”.
    e) Press OK, OK

    3)Set permissions on your shared file:
    Code:
    sudo chmod 0777 /home/YOUR_NAME/samba
    4)Stop samba:
    Code:
    sudo /etc/init.d/samba stop
    5)Backup the original smb.conf file:
    Code:
    sudo mv /etc/samba/smb.conf /etc/samba/smb.conf.backup
    6)Make a new smb.conf file:
    Code:
    sudo touch /etc/samba/smb.conf
    7)Open smb.conf for editing:
    Code:
    sudo gedit /etc/samba/smb.conf
    8)Paste the following into your smb.conf file (mostly copied from Stormbringer)...
    (I've put *** (no)against the entries you may need to change immediately. Please remove the ***(nos) when you've finished editing.)
    Code:
    [global]
    ;General server settings
    netbios name = Ubuntu***(1)
    workgroup = Mshome***(2)
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
    
    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast
    wins support = yes
    
    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 
    [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
    
    [MyFiles]
    path = /home/YOURNAME/samba***(3)
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = paul***(4)
    force group = paul***(5)
    available = yes
    public = yes
    writable = yes
    9)Personalise your new smb.conf file by editing the ***(nos). You can do any other editing you want to do later when everything is up and running.
    ***(1) Use any sensible name, but remember what it is.
    ***(2) Use the same workgroup name as Windows XP (usually Mshome).
    ***(3) This is the shared folder you created earlier
    ***(4 & 5) This is the username you use for Windows XP. Don't use spaces. If necessary, modify the username you use for your guest XP machine (Explorer->Control Panel->User Accounts).

    10)Start samba:
    Code:
    sudo /etc/init.d/samba start
    11)Add yourself as a samba user:
    NOTE: You will be asked for a password - make sure you use the same as you use for login
    Code:
    sudo smbpasswd -L -a your_username
    sudo smbpasswd -L -e your_username
    That's all for samba, now for the Windows part:

    12)In the Windows XP machine VM -> Settings -> Ethernet, I chose Nat

    13)Find out the ip of your linux box and the vmware connections by typing ifconfig in a Ubuntu terminal. You will probably see 4 or more ip addresses. Write down each of the 4 (or more) inet addr addresses.

    14)In the Windows guest machine:
    - Click "START"
    - Click "Control Panel"
    - Click "Network Connections"
    - Find your "LAN Connection"
    - Right-click the icon and select "Properties"
    - Select the "TCP/IP" Protocol and click the "Properties" button
    - Click "Advanced"
    - Select the third Tab entitled "WINS"
    - Click "Add"
    - Type in each of the ip addresses you copied down from 13) above & click “Add” for each one
    - Select "Use NetBIOS over TCP/IP"
    - Click "OK"
    - Click "OK"
    - Click "OK"
    - Reboot the guest Windows

    15)In the Windows guestmachine:
    - Click “Start”
    - Right-click “My Computer”
    - Click “Map Network Drive”
    - Choose a folder letter
    - In the Folder field type \\Ubuntu (or the netbios name you chose)\MyFiles(the name chosen for the Ubuntu shared folder)
    - Tick “Reconnect at logon”
    - Press “Finish”

    If all has gone well, whatever you see in the Ubuntu shared drive will be seen in the nominated XP drive. Copying or moving files from/to Ubuntu and the XP guest is now very straightforward.

    I've given these instructions in good faith and they represent what I had to do to get my samba connection working between my Ubuntu partition and its Win XP VMWare guest. If they don't work for you, I'm sorry but I doubt if there's a lot I can do to help because I am very new to Ubuntu. and I had to struggle for more than a day to get this working. Huge Credits to Peturr for the Howto:VMWare installation, and to Stormbringer for his Howto:Setup Samba Peer to Peer from which I borrowed freely.

    Good luck...
    Last edited by Ziggy72; November 10th, 2006 at 06:50 AM.

  2. #2
    Join Date
    Aug 2006
    Location
    Poland
    Beans
    234
    Distro
    Ubuntu 10.10 Maverick Meerkat

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    Good howto... But if you are a little paranoid about security, then I would suggest running samba only for interfaces supplied by vmware. To do it you should add to lines in global section of smb.config:

    Code:
    interfaces = vmnet8 vmnet1
    bind interfaces only = true
    Of course names of the interfaces can differ - see output of ifconfig...

  3. #3
    Join Date
    May 2006
    Beans
    133

    Exclamation Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    Quote Originally Posted by Ziggy72 View Post
    ***(4 & 5) This is the username you use for Windows XP. Don't use spaces. If necessary, modify the username you use for your guest XP machine (Explorer->Control Panel->User Accounts).
    Wow, this might be the first time I post with useful information rather than a solicitation for assistance.

    Changing your XP username as described above will not work as expected. Let's say my XP username is "Pitt Stains" and I decide to change it to "pstains" to eliminate the space and make life with Samba easier. When I click my start bar in Windows, it will now say "pstains" at the top rather than "Pitt Stains," but Samba will still require me to manually log in each time I try to connect to a network drive. The old username is still the "official" system username; the new username is more of a display name or an alias.

    This knowledge base article (http://support.microsoft.com/default...b;en-us;811151) helped me transfer most of the settings of "Pitt Stains" to a newly created account called "pstains." It's not quite perfect, but I believe the only setting I had to change manually in the new account was the desktop background.

    Best of luck!
    -Pitt

  4. #4
    Join Date
    May 2006
    Beans
    133

    Lightbulb Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    And here's an even better solution: Don't change either of your usernames!

    I'm not sure how I came across this, but here's the correct way to make Samba understand a Windows username with spaces.

    In the [global] section of your smb.conf file, add this line:
    Code:
    username map = /etc/samba/smbusers
    Then create a file called smbusers, put it in the appropriate directory, and write this to it:
    Code:
    #Unix_name = "Windows name with spaces"
    pittstains = "Pitt Stains"
    The line that begins with a # is just a comment, if you're new to all this, and obviously you should use your usernames and not mine!

  5. #5
    Join Date
    Nov 2006
    Beans
    13

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    Really nice guide! Worked out of the box for me! Thank you!

  6. #6
    Join Date
    May 2006
    Beans
    16
    Distro
    Ubuntu 9.04 Jaunty Jackalope

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    Great guide! Got XP running via Vmware server on Kubuntu sharing files and printers flawlessly with other computers on my windows network.

    Much appreciated Ziggy72!

  7. #7
    Join Date
    Jan 2007
    Beans
    3

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    Hello:

    I'm a nob here. I tried many times to follow this How To. I always stuck in the last step, where I tried to setup Map Network Drive. When I tried to put in Forder field: \\server\shared, I got the following error message: The network path \\server\shared could not be found. Here is my smb.conf. Hope somebody can give guidance, which I did wrong. BTW, I use Kubuntu 6.10.

    Code:
    [global]
    ;General server settings
    netbios name = server
    workgroup = home
    announce version = 5.0
    socket options = TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192
    
    passdb backend = tdbsam
    security = user
    null passwords = true
    username map = /etc/samba/smbusers
    name resolve order = hosts wins bcast
    wins support = yes
    
    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 
    [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
    
    [Shared]
    path = /home/altari/Shared
    browseable = yes
    read only = no
    guest ok = no
    create mask = 0644
    directory mask = 0755
    force user = rais
    force group = rais
    available = yes
    public = yes
    writable = yes
    Thank you,
    Kadalz

  8. #8
    Join Date
    Mar 2006
    Beans
    16
    Distro
    Xubuntu 6.10 Edgy

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    thanks for the HowTo. these types of instructions are invaluable to n00bs such as myself.

    i might suggest, however, that you add a note ("***(no)") next to the [MyFiles] field in your smb.conf file. i myself chose a different folder name in step 15 of your instructions when mapping the network drive on windows, while failing to amend my smb.conf file.

    but then again, i was inebriated at the time

  9. #9
    Join Date
    Feb 2006
    Location
    Québec, Canada
    Beans
    Hidden!
    Distro
    Gutsy Gibbon Testing

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    Hi! Thank you for the great guide! Just a question: does "NAT" networking or "Bridged" networking makes a difference? I'm using NAT networking, followed all those steps but I cannot access shared folders from an OS to the other. The only shared folders I can access now are: in Windows, shared folders from Windows, and in Ubuntu, shared folders in Ubuntu. I am using Edgy, if that makes a difference.

    Thank you!

    -FM

  10. #10
    Join Date
    Jan 2006
    Beans
    15

    Re: HOWTO: Setup samba with Windows XP running as a VMWare server guest

    i have diligently followed these instructions, with no results. i apparently don't have an internet connection from within my windows xp -- could this be the problem, potentially? i don't really see how it would be, but it's just a guess, and i have to say i've beaten my head against this for a day, as has a much more linux-experienced friend, and i'm getting nowhere. any help or ideas would be much appreciated.

Page 1 of 6 123 ... LastLast

Bookmarks

Posting Permissions

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