network problem

Asked by Andrew

hi i have tried to get my wired network running but not having much luck , it works one way i can view docs on one pc but not the other way round cannot view docs on first pc from second one . may be a problem with computer names could be the same how do i check my computers network name as i believe ech one needs a different name how do i find this and if necessary change it . any help with this would br great .

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:

This question was reopened

Revision history for this message
Cross (strokemeister) said :
#1

Hello Andrew, really I have never got any kind of problem with my netwow I thrk, btink this is a mistake at the config's
Check it and retry again.
(This is not a full answer, sorry if this isn't so helpfully)

Revision history for this message
Andrew (workshop1702) said :
#2

Thanks Cross, that solved my question.

Revision history for this message
Andrew (workshop1702) said :
#3

still need answer as this didnt help

Revision history for this message
Cross (strokemeister) said :
#4

Okay you use Ubuntu on both computer's? If yes; have you got configured your router?

Revision history for this message
Andrew (workshop1702) said :
#5

god knows i can get on the internet ok its a modem router in one unit and i get two linux pc on the network and one windows which i dont realy understand as i dont use windows anymore as i cannot put up wit all the unexplained slow downs and crashes each day xp seems to be so unstable its almost unusable

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#6

https://help.ubuntu.com/community/SettingUpSamba

a common problem is that your computers are not on the same "workgroup" makesure that the work group is the same and that the WINS address is the IP Address of your router, oh and that the WINS Support option is NOT enabled (this turns your computer into a wins server, this be bad)

- Brian Michalski

Revision history for this message
Andrew (workshop1702) said :
#7

need more help please haow do i do all of this dont know how to do it on linux

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#8

open up a terminal, to do this, Applications--->Accessories--->Terminal

type the following:
sudo apt-get install samba

enter your password when prompted, dont worry, it will not show it on screen.
then type:
sudo gedit /etc/samba/smb.conf

you need to check/change the following:
under global, the workgroup should be set to the workgroup of your network
under global, the WINS server needs to be set to the IP Address of your router
under global, if there is a line that says something specific about "wins support", delete that line.

when your done, save and close. now as your still in the terminal, type:
smbpasswd -a [your username/the user name of someone else]

enter the normal login password for the user that your setting smbpasswd,
this will allow that user login remotely to your computer via samba (windows computers).
this needs to be done for every user that is going to use file sharing.

now that you have samba set up (YAY!) you need to tell it what folders to share.
open up System--->Administration--->Shared Folders
set the path to the folder you wish to share
share through samba
the name is how you want it to show up on the remote computer
a personal comment if wanted
and check "read only" if you DONT want people to change the files in that folder remotely.

-Brian Michalski

Revision history for this message
Andrew (workshop1702) said :
#9

i dont have any windows machines on my network they all have ubuntu on them do i still need to instal samba to get my network to work

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#10

an alternate is NFS (https://help.ubuntu.com/community/SettingUpNFSHowTo)
yet samba over all is simple-er and more secure (funny I never thought I'd say that for a Microsoft product...)

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#11

correction, NFS is HARDER to secure, in the end if configured properly (difficult to do) then its probably more secure than samba

Revision history for this message
Andrew (workshop1702) said :
#12

do i need samba even though i dont have any pcs with windows on them all my machines have ubuntu 7.10 on them

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#13

the Samba protocol is the standard of windows networking. due to the wide amount of windows machine in the world, Samba is also a global standard. to make this protocol available to linux, we (as developers) made the samba program, which basicly is the program that manages samba connections on linux machines.

when using samba, its exactly like using network drives on windows, if you've ever used this, you would know its a breeze.

NFS is a more advanced (and more complicated) protocol for file sharing, but windows machine do not support this protocol.

if you dont have any windows machine on your network, you dont NEED to use samba, but its a preffered method among many. an alternative if you dont want to use samba is NFS. due to your apparent under-knowledge of linux and its components (no offence) i dont recommend you use it.

if you still dont want to use samba, you can take one computer that has the files you want to share and make it a webserver with web folders, this will allow you to browse a certain directory and download files, but not make changes.
(https://help.ubuntu.com/community/ApacheMySQLPHP the apache 2 section)

or you could set up a FTP (file transfer protocol) server on the machine that has the files. with FTP (also a global standard, but less preffered for these specific situations) you can have your users logon to that machine and download/upload files. thus allowing you to make changes, in a non-transparent way.
(https://help.ubuntu.com/community/ProFTPD?highlight=%28FTP%29)

Revision history for this message
Andrew (workshop1702) said :
#14

right looks like samba is the easiest so i think its best for me as i dont know what i am doing .
have installed it and put sudo gedit /etc/samba/smb.conf into the terminal and it then opens something , it looks like an example explaining things dont understand what i need to do next , is it this that i need to alter if so what do i do when i alter it . Andrew

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#15

This may help you:

http://screencasts.ubuntu.com/SAMBA_Filesharing

Hope this helps

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#16

yeah....you could do that(... :P)

Revision history for this message
Andrew (workshop1702) said :
#17

sorry folks still cannot understand what i need to do , help please

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#18

follow the instructions i gave above, when you type in the: sudo gedit /etc/samba/smb.conf
and it opens a windows, thats a text editor, you can make changes to that file.

everything in ubuntu, linux for that matter, is a file. including configuration. its all organized in a nice heirarchy folder system and each component has its own config file.

ignore all of the example things, this would be the stuff that look like this:
# in this config file, XYZ
#change this option to enable "cheese" (not real example)

but note that stuff that looks like this:
#share type: user-xyz
is likely an option that was disabled, if theres a "#" in front of it, the system ignores it and thus it does nothing

wheras if its:
share type:user-xyz
then it is a config option that the system looks at and acts on (thus changing how your system works

---------------------------------------------------------------------------------------
when i say under "global" (as said above)
observe the structure of the config file and you may note that the overall file is devided into sections,
like global, security, domain, ect...

the option "workgroup = <XYZ>"
needs to be changed to the workgroup your network uses.

the option "wins server = <the IP address of your router>"
im not sure what this is, look at the documentation (the manual) of your router to find out

the line "wins support = <no/yes>"
needs to be uncommented (no "#" in front of it) and needs to be "no"
thus it should look like this:
wins support = no

----------------------------------------------------------------------------------------

save the file, and then continue on with the instructions i gave above,
if you have more questions, feel free to ask. :)

-Brian Michalski

Revision history for this message
Andrew (workshop1702) said :
#19

this is what i get when i put in sudo gedit /etc/samba/smb.conf

#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
# This is the main Samba configuration file. You should read the
# smb.conf(5) manual page in order to understand the options listed
# here. Samba has a huge number of configurable options most of which
# are not shown in this example
#
# Any line which starts with a ; (semi-colon) or a # (hash)
# is a comment and is ignored. In this example we will use a #
# for commentary and a ; for parts of the config file that you
# may wish to enable
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any abasic syntactic
# errors.
#

#======================= Global Settings =======================

[global]

## Browsing/Identification ###

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = MSHOME

# server string is the equivalent of the NT Description field
   server string = %h server (Samba, Ubuntu)

# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable its WINS Server
; wins support = no

# WINS Server - Tells the NMBD components of Samba to be a WINS Client
# Note: Samba can be either a WINS Server, or a WINS Client, but NOT both
; wins server = w.x.y.z

# This will prevent nmbd to search for NetBIOS names through DNS.
   dns proxy = no

# What naming service and in what order should we use to resolve host names
# to IP addresses
; name resolve order = lmhosts host wins bcast

#### Networking ####

# The specific set of interfaces / networks to bind to
# This can be either the interface name or an IP address/netmask;
# interface names are normally preferred
; interfaces = 127.0.0.0/8 eth0

# Only bind to the named interfaces and/or networks; you must use the
# 'interfaces' option above to use this.
# It is recommended that you enable this feature if your Samba machine is
# not protected by a firewall or is a firewall itself. However, this
# option cannot handle dynamic or non-broadcast interfaces correctly.
; bind interfaces only = true

#### Debugging/Accounting ####

# This tells Samba to use a separate log file for each machine
# that connects
   log file = /var/log/samba/log.%m

# Put a capping on the size of the log files (in Kb).
   max log size = 1000

# If you want Samba to only log through syslog then set the following
# parameter to 'yes'.
; syslog only = no

# We want Samba to log a minimum amount of information to syslog. Everything
# should go to /var/log/samba/log.{smbd,nmbd} instead. If you want to log
# through syslog you should set the following parameter to something higher.
   syslog = 0

# Do something sensible when Samba crashes: mail the admin a backtrace
   panic action = /usr/share/samba/panic-action %d

####### Authentication #######

# "security = user" is always a good idea. This will require a Unix account
# in this server for every user accessing the server. See
# /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/ServerType.html
# in the samba-doc package for details.
; security = user

# You may wish to use password encryption. See the section on
# 'encrypt passwords' in the smb.conf(5) manpage before enabling.
   encrypt passwords = true

# If you are using encrypted passwords, Samba will need to know what
# password database type you are using.
   passdb backend = tdbsam

   obey pam restrictions = yes

; guest account = nobody
   invalid users = root

# This boolean parameter controls whether Samba attempts to sync the Unix
# password with the SMB password when the encrypted SMB password in the
# passdb is changed.
; unix password sync = no

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<email address hidden> for
# sending the correct chat script for the passwd program in Debian Sarge).
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\sUNIX\spassword:* %n\n *Retype\snew\sUNIX\spassword:* %n\n *password\supdated\ssuccessfully* .

# This boolean controls whether PAM will be used for password changes
# when requested by an SMB client instead of the program listed in
# 'passwd program'. The default is 'no'.
; pam password change = no

########## Domains ###########

# Is this machine able to authenticate users. Both PDC and BDC
# must have this setting enabled. If you are the BDC you must
# change the 'domain master' setting to no
#
; domain logons = yes
#
# The following setting only takes effect if 'domain logons' is set
# It specifies the location of the user's profile directory
# from the client point of view)
# The following required a [profiles] share to be setup on the
# samba server (see below)
; logon path = \\%N\profiles\%U
# Another common choice is storing the profile in the user's home directory
; logon path = \\%N\%U\profile

# The following setting only takes effect if 'domain logons' is set
# It specifies the location of a user's home directory (from the client
# point of view)
; logon drive = H:
; logon home = \\%N\%U

# The following setting only takes effect if 'domain logons' is set
# It specifies the script to run during logon. The script must be stored
# in the [netlogon] share
# NOTE: Must be store in 'DOS' file format convention
; logon script = logon.cmd

# This allows Unix users to be created on the domain controller via the SAMR
# RPC pipe. The example command creates a user account with a disabled Unix
# password; please adapt to your needs
; add user script = /usr/sbin/adduser --quiet --disabled-password --gecos "" %u

########## Printing ##########

# If you want to automatically load your printer list rather
# than setting them up individually then you'll need this
; load printers = yes

# lpr(ng) printing. You may wish to override the location of the
# printcap file
; printing = bsd
; printcap name = /etc/printcap

# CUPS printing. See also the cupsaddsmb(8) manpage in the
# cupsys-client package.
; printing = cups
; printcap name = cups

# When using [print$], root is implicitly a 'printer admin', but you can
# also give this right to other users to add drivers and set printer
# properties
; printer admin = @lpadmin

############ Misc ############

# Using the following line enables you to customise your configuration
# on a per machine basis. The %m gets replaced with the netbios name
# of the machine that is connecting
; include = /home/samba/etc/smb.conf.%m

# Most people will find that this option gives better performance.
# See smb.conf(5) and /usr/share/doc/samba-doc/htmldocs/Samba3-HOWTO/speed.html
# for details
# You may want to add the following on a Linux system:
# SO_RCVBUF=8192 SO_SNDBUF=8192
   socket options = TCP_NODELAY

# The following parameter is useful only if you have the linpopup package
# installed. The samba maintainer and the linpopup maintainer are
# working to ease installation and configuration of linpopup and samba.
; message command = /bin/sh -c '/usr/bin/linpopup "%f" "%m" %s; rm %s' &

# Domain Master specifies Samba to be the Domain Master Browser. If this
# machine will be configured as a BDC (a secondary logon server), you
# must set this to 'no'; otherwise, the default behavior is recommended.
; domain master = auto

# Some defaults for winbind (make sure you're not using the ranges
# for something else.)
; idmap uid = 10000-20000
; idmap gid = 10000-20000
; template shell = /bin/bash

#======================= Share Definitions =======================

# Un-comment the following (and tweak the other settings below to suit)
# to enable the default home directory shares. This will share each
# user's home directory as \\server\username
;[homes]
; comment = Home Directories
; browseable = no

# By default, \\server\username shares can be connected to by anyone
# with access to the samba server. Un-comment the following parameter
# to make sure that only "username" can connect to \\server\username
; valid users = %S

# By default, the home directories are exported read-only. Change next
# parameter to 'yes' if you want to be able to write to them.
; writable = no

# File creation mask is set to 0600 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0664.
; create mask = 0600

# Directory creation mask is set to 0700 for security reasons. If you want to
# create dirs. with group=rw permissions, set next parameter to 0775.
; directory mask = 0700

# Un-comment the following and create the netlogon directory for Domain Logons
# (you need to configure Samba to act as a domain controller too.)
;[netlogon]
; comment = Network Logon Service
; path = /home/samba/netlogon
; guest ok = yes
; writable = no
; share modes = no

# Un-comment the following and create the profiles directory to store
# users profiles (see the "logon path" option above)
# (you need to configure Samba to act as a domain controller too.)
# The path below should be writable by all users so that their
# profile directory may be created the first time they log on
;[profiles]
; comment = Users profiles
; path = /home/samba/profiles
; guest ok = no
; browseable = no
; create mask = 0600
; directory mask = 0700

wins support = no
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   public = no
   writable = no
   create mode = 0700

# Windows clients look for this share name as a source of downloadable
# printer drivers
[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no
# Uncomment to allow remote administration of Windows print drivers.
# Replace 'ntadmin' with the name of the group your admin users are
# members of.
; write list = root, @ntadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
; comment = Samba server's CD-ROM
; writable = no
; locking = no
; path = /cdrom
; public = yes

# The next two parameters show how to auto-mount a CD-ROM when the
# cdrom share is accesed. For this to work /etc/fstab must contain
# an entry like this:
#
# /dev/scd0 /cdrom iso9660 defaults,noauto,ro,user 0 0
#
# The CD-ROM gets unmounted automatically after the connection to the
#
# If you don't want to use auto-mounting/unmounting make sure the CD
# is mounted on /cdrom
#
; preexec = /bin/mount /cdrom
; postexec = /bin/umount /cdrom

[andrew]
path = /home/andrew
available = yes
browsable = yes
public = yes
writable = no

affraid all this is a bit beyond me what do i need to do now please

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#20

Andrew please check your /etc/samba/smb.conf

[andrew]
path = /home/andrew
available = yes
browsable = yes -----> change to ----> browseable=yes
public = yes
writable = no

hope this helps

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#21

...marcobra?

either way,
andrew, I can re-write your config file for you if you would like.
that way all you would have to do is copy what i put here and paste it into the config file.(while erasing everything else.)

please let me know if you would like this.
if so, you need to provide me with some fairly basic questions.
1. what is the IP of your router?
2. what is the workgroup name of the other Ubuntu computer?
3. what files do you want to share? (I need the folder path pasted onto here.)
4. do you want these files to be read only? (so that you cant change them remotly)
and last but not least, 5. do you want to force users to login to your computer to access files remotly
(if yes to question 5, this would mean they would have to provide a valid user name and password of the computer sharing the files, to be able to access them.)

Revision history for this message
Andrew (workshop1702) said :
#22

hi thanks for the answer affraid router set up and networks are a bit of a mistery to me i would love to be able to understand it all . how do i find the ip address of my router,is the workgroup name the name of the pc when you first set it up , what is the folder path

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#23

ok now assuming that your computer hasnt been commited to a complete makeover(trust me theres more available than changing the desktop background), right click the network icon in the upper right hand corner.

click network(connection) information
with you behind your router, the "gateway" ip (should be in form: xxx.xxx.xxx.xxx --->x being a number, not always 3 x's in one section, there may be less eg: 123.321.212.222 or 123.321.91.1 :)

thats your routers IP, set that as the WINS Server

since you have ubuntu on your other computer, do this for both!!! doesnt matter if one works and the other doesnt. doing both will save you from problems :) now going on, set the workgroup to any random thing that pleases you, last name, house name, name of funky tasting cheese, anything.

a folder path is like..well a path! in windows you may have seen something like: C:/users/michalski/desktop/homework
in ubuntu we do it slightly differently... on your desktop click Places--->Computer
and then go into "File System" you'll note that there are quite a few folders. this is the root of your system

each folder has a unique purpose in digital life :)
/usr holds programs and some configuration for those programs
/bin and /sbin has special system programs (you most likely dont use any of these directly but your computer uses them all the time!
/home is where users files and settings are stored
/etc has system configuration settings
/OPS has the operations files, orders and stats

and so forth, /home/andrew is your Home, feel safe in it, it is protected from other users.
so instead of C:/ and then the path, we use
/ thats it :P easier eh?
so a full path to one thing you might want to share would be,
/home/andrew/Desktop/photos
that will share the photos folder (it would be on your desktop)
note that for some odd reason the "d" in desktop MUST be capitalized

wow what a mouth full :)

Revision history for this message
zzzxxx (michalski-deactivatedaccount-deactivatedaccount) said :
#24

ignore the /OPS folder, thats just on my computer :)

Can you help with this problem?

Provide an answer of your own, or ask Andrew for more information if necessary.

To post a message you must log in.