We use WAMU Online Free Checking - sign up in 5 Minutes!
Powered by MaxBlogPress 

How to access Ubuntu PC on Windows Network

Posted in tutorial, ubuntu linux on Oct 07, 2008

I created this tutorial how to page because I had trouble accessing my Ubuntu PC from my Windows based Network (Windows Vista, Windows XP) in my home. I have 4 PC’s (wired and wireless) connected to a router - which is the how they get out the Internet. All the PC’s (including the Ubuntu one) have the same network “workgroup” name. In addition this tutorial assumes you alread have “Samba” installed, and if you don’t run this first in terminal:


sudo apt-get install samba

Next, stop samba while you make the required changes by running this in terminal:


sudo /etc/init.d/samba stop

Now you need to edit the samba config file, which is located here:


/etc/samba/smb.conf

You can open it in a text editor to make changes by running this in terminal:


sudo gedit /etc/samba/smb.conf

Copy and poast the following into smb.conf:


[global]
 ; General server settings
 netbios name = YOUR_HOSTNAME
 server string =
 workgroup = YOUR_WORKGROUP
 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 - 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

[MyFiles]
 path = /media/samba/
 browseable = yes
 read only = no
 guest ok = no
 create mask = 0644
 directory mask = 0755
 force user = YOUR_USERNAME
 force group = YOUR_USERGROUP

Next, you’re going to want to edit the appropriate values:

netbios name = name_of_your_computer_will_be_on_the_network
workgroup = same_name_all_computers_in_house_use_as_workgroup
wins suypport = yes
force user = YOUR_USERNAME
force group = YOUR_USERGROUP

you can edit anything else you want, but in most cases at least those 5 things are required. Now, start samba back up:


sudo /etc/init.d/samba start

Next, you need to actually ADD THE USERS MANUALLY INTO SAMBA (this is why mine was failing - I never did this part). Run these commands in terminal:


sudo smbpasswd -L -a your_username
sudo smbpasswd -L -e your_username

You will be asked for a password after running the first one, BE SURE to use your LOGIN password and username for Ubuntu! That’s it! You should now be able to see and access the Ubuntu box on the Windows based network, and login from another PC using your main Ubuntu username and password. Any files or folders you right click and “share” on the Ubuntu box will appear on the PC’s now when you go to “Network” and the name of your Ubuntu box.

If you get stuck or need more info, view this page for reference.

Print This Post Print This Post

RSS feed | Trackback URI

Comments »

No comments yet.

Name (required)
E-mail (required - never shown publicly)
URI
Subscribe to comments via email
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> in your comment.
  • My name is John Pratt and I like all kinds of geeky, gadget tech stuff. I maintain web sites, write a little code, fool around with Wordpress, Ubuntu, play lead guitar in a band, and have a general fondness for computers electronic 'thingies'!