Δίκτυο με Ubuntu

padelis2 | Πέμ, 06/26/2008 - 21:23 | 1' | 13

Θέλω να δικτυώσω δύο υπολογιστές με Ubuntu 8.04 για κάθε χρήση (μοίρασμα αρχείων, Ιντερνετ, παιχνίδια, chat κλπ). Διαθέτω ρούτερ, χαμπ, κάρτες εθερνετ 10/100 και τα απαραίτητα καλώδια.

Πως γίνεται μέσα από το γραφικό περιβάλλον;

Αν δεν γίνεται μέσα από το γραφικό περιβάλλον, μπορείτε να μου περιγράψετε αναλυτικά τη διαδικασία από τη γραμμή εντολής;

Φόρουμ
Δώσε αστέρια!

MO: (ψήφοι: 0)

Σχόλια

κοιτα, για παιχνιδια κτλ δεν εχω ασχοληθει, ομως οι υπολογιστες μου, πραγματικοι και εικονικοι ειναι δικτυομενοι χωρις προβλημα με την ιδια διανομη (και με οσες εχω δοκιμασει μεχρι τωρα δεν ειχα καποιο προβλημα εκτος απο πριν καπου 3 χρονια που δε μπορουσα να δικτυοσω με win)
Για φακελους απλα φτιαχνεις κοινοχρηστους (δεξι κλικ και δινεις share) και μετα βρισκεις το δικτυο (καλο ειναι να υπαρχει καπου στην επιφανεια εργασιας) και οι κοινοχρηστοι μοιραζονται ετσι απλα!
Μετα δινεις οσο "σκληρα" ή "χαλαρα" δικαιωματα θες.
Στο 8.04 αν θυμαμαι δε χρειαστηκε ουτε samba να εγκαταστησω (η ισως και να το εκανα και να μη θυμαμαι)
internet δινω απ ευθειας απο το ruter και προφανως το ιδιο θα κανεις κι εσυ αφου διαθετεις ενα τετοιο οπως λες εκτος κι αν θες να βαζεις "κόφτες".
Απο κει και περα μπορεις να εχεις μεχρι και remote και οτι αλλο θες.

Γενικα στο ubuntu μπορεις να τα κανεις ολα (η σχεδον ολα ) ανετα -η εστω με ελαχιστη δυσκολια- μεσα απο γραφικο περιβαλλον (Aν και στις emergency καταστασεις εχω εκτιμησει την κονσολα πολυ περισσοτερο αλλα αυτο ειναι αλλη ιστορια και για πιο extreme καταστασεις απο μια απλη δικτυωση)

Ευχαριστώ για την καθοδήγηση. Παρακάτω φαίνεται τι έκανα και στους δύο υπολογιστές.

1. Με δεξί κλικ στο φάκελο Δημόσιο που υπάρχει στο home επέλεξα ιδιότητες και μετά την καρτέλα Share.

2. Τσέκαρα το Share this folder. Τότε το πρόγραμμα με πληροφόρισε ότι πρέπει να εγκατασταθούν κάποια αρχεία (του Samba) και εγώ συμφώνησα.

3. Αφού τελείωσε η εγκατάσταση τσέκαρα και τα Allow other people ... και Guest access (γιατί έτσι ήθελα) και πάτησα το κουμπί Create share.

4. Από το μενού Τοποθεσίες επέλεξα Δίκτυο και εμφανίστηκε ένα εικονίδιο με όνομα Δίκτυο Windows. Με διπλό κλικ εμφανίζεται ο τομέας WORKGROUP και με διπλό κλικ εμφανίζονται οι δύο υπολογιστές του δικτύου.

5. Με διπλό κλικ σε κάθε ένα από τους υπολογιστές εμφανίζονται οι φάκελοι Δημόσιο και print$. Στο φάκελο Δημόσιο μπορώ να κάνω ότι θέλω, ενώ στον print$ μου ζητάει συνθηματικό, άλλο από αυτό που έχω για να συνδέοομαι ως χρήστης στο Linux.

Απορίες:

1. Έχω κάνει δίκτυο Linux - Linux ή δίκτυο Linux - Windows;

2. Πως καθορίζω συνθηματικό για το φάκελο print$;

3. Αν υποθέσω ότι θέλω να παίξω ένα δικτυακό παιχνίδι με τους δύο υπολογιστές, πώς βρίσκω τις διευθύνσεις τους στο τοπικό δίκτυο;

Απαντήσεις
1. Έχεις κάνει δίκτυο Linux-Windows, χρησιμοποιώντας το Samba (server και client).
2. Μην σε ανησυχεί αυτό. Δεν χρειάζεται να ορίσεις κάποιο συνθηματικό για εκεί.

--Stat rosa pristina nomine, nomina nuda tenemus

Για το 3. στο linux ο πιο απλός τρόπος είναι να κάνεις κλικ στο εικονίδιο δικτύωσης που εμφανίζεται στην περιοχή ειδοποίησης. Από κονσόλα, η εντολή είναι

/sbin/ifconfig | grep inet
Θα δείς κάτι σαν κι αυτό:

me@virtual-desktop:~$ /sbin/ifconfig |grep inet

          inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0

H διεύθυνσή σου είναι η πρώτη.

Στα Windows, η αντίστοιχη εντολή είναι ipconfig.

--Stat rosa pristina nomine, nomina nuda tenemus

Τώρα έχω πρόβλημα. Όπως έγραψα παραπάνω κατόρθωσα να έχω κοινούς φακέλους σε δύο μηχανάκια με Linux. Στη συνέχεια επειδή κάπως μου ήρθε εγκατέστησα με την "Προσθαφαίρεση" το Samba. Πίστευα ότι θα έχω περισσότερο έλεγχο μιας και η δικτύωση αυτού του είδους βασίζεται στο Samba. Ε, το μηχανάκι που εγκατέστησα το Samba δεν βλέπει το δίκτυο (κανένα από τους δύο υπολογιστές). Ανοίγω το Samba από το Εφαρμογές > Σύστημα και δεν καταλαβαίνω τίποτα. Το άλλο όμως μηχανάκι δουλεύει κανονικά, μόνο που βλέπει ένα μόνο υπολογιστή (τον εαυτό του). Βγάζω λοιπόν το Samba και επαναλαμβάνω τα ίδια βήματα που περιγράφω παραπάνω. Αποτέλεσμα; Τζίφος!!! Το μηχανάκι δεν βλέπει δίκτυο.

Καμμια ιδέα για το δίκτυο;

Μπορεις να κάνεις copy/paste το αρχείο /etc/samba/smb.conf;

--
Where is the ripcord, the trap door, the key?
Where is the cartoon escape-hatch for me?

http://www.linuxinsider.gr/content/%CF%80%CF%89%CF%82-%CE%BC%CE%BF%CE%B9%CF%81%CE%AC%CE%B6%CF%89-%CE%B1%CF%81%CF%87%CE%B5%CE%AF%CE%B1-%CE%B1%CF%80%CF%8C-linux-%CF%83%CE%B5-windows-%CE%AE-linux-pcs

Αυτός ο οδηγός ίσως σε βοηθήσει.

[global]
netbios name = Samba24
server string = CAD architects, Stockholm. East 32nd st, 34th floor
workgroup = Workgroup
security = user
hosts allow = 127. 192.168.0.
interfaces = 127.0.0.1/8 192.168.0.0/24
remote announce = 192.168.0.255
remote browse sync = 192.168.0.255
printcap name = /etc/printcap
;    load printers = yes
cups options = raw
;    printing = cups
guest account = smbguest
log file = /var/log/samba/samba.log
max log size = 1000
;    null passwords = no
username level = 8
password level = 8
;    encrypt passwords = yes
unix password sync = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
local master = no
domain master = no
preferred master = no
;    domain logons = no
os level = 33
logon drive = m:
logon home = \\%L\homes\%u
logon path = \\%L\profiles\%u
logon script = %G.bat
;    time server = no
name resolve order = wins lmhosts bcast
;    wins support = no
wins server =
;    wins proxy = no
dns proxy = no
;    preserve case = yes
;    short preserve case = yes
client use spnego = no
client signing = no
client schannel = no
;    server signing = no
server schannel = no
;    nt pipe support = yes
;    nt status support = yes
allow trusted domains = no
obey pam restrictions = yes
enable spoolss = yes
;    client plaintext auth = no
;    disable netbios = no
follow symlinks = no
update encrypted = yes
;    pam password change = no
passwd chat timeout = 120
;    hostname lookups = no
username map = /etc/samba/smbusers
;    smb passwd file = /etc/samba/smbpasswd
passwd program = /usr/bin/passwd '%u'
passwd chat = *New*password* %n
*ReType*new*password* %n
*passwd*changed*

add user script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null '%u'
add user to group script = /usr/sbin/useradd -d /dev/null -c 'Samba User Account' -s /dev/null -g '%g' '%u'
add group script = /usr/sbin/groupadd '%g'
delete user script = /usr/sbin/userdel '%u'
delete user from group script = /usr/sbin/userdel '%u' '%g'
delete group script = /usr/sbin/groupdel '%g'
add machine script = /usr/sbin/useradd -d /dev/null -g sambamachines -c 'Samba Machine Account' -s /dev/null -M '%u'
machine password timeout = 120
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
template shell = /dev/null
winbind use default domain = yes
winbind separator = @
winbind cache time = 360
winbind trusted domains only = yes
winbind nested groups = no
winbind nss info = no
;    winbind refresh tickets = no
;    winbind offline logon = no

[homes]
comment = Home Directories
path = /home
read only = no
;    available = yes
;    browseable = yes
;    guest ok = no
;    printable = no
share modes = no
locking = no

[netlogon]
comment = Network Logon Service
path = /home/netlogon
read only = no
;    available = yes
;    browseable = yes
;    guest ok = no
;    printable = no
share modes = no
locking = no

[profiles]
comment = User Profiles
path = /var/samba/profiles
read only = no
;    available = yes
browseable = no
;    guest ok = no
;    printable = no
locking = no
create mode = 0600
directory mask = 0700

[printers]
comment = All Printers
path = /var/spool/samba
;    browseable = yes
;    writable = no
;    guest ok = no
printable = yes
share modes = no
locking = no

[pdf-documents]
path = /home/pdf-documents
comment = Converted PDF Documents
;    available = yes
;    browseable = yes
writeable = yes
guest ok = yes

[pdf-printer]
path = /tmp
comment = PDF Printer Service
printable = yes
guest ok = yes
use client driver = yes
printing = bsd
print command = /usr/bin/gsambadpdf %s %u
lpq command =
lprm command =

[Δημόσιο]
path = /home/padelis/Δημόσιο
writeable = yes
;    browseable = yes
guest ok = yes

Χμμ..padelis2, βλέπω εκτεταμένες αλλαγές στο smb.conf. Είσαι σίγουρος ότι δεν το έχεις πειράξει με το χέρι; ;).

Τέσπα, κοιτώντας το δικό μου καθαρό smb.conf, θα πω λοιπόν μερικές ιδέες.

Καταρχήν έλεγξε ότι δεν είναι θέμα συνδέσεων. Δηλαδή τσέκαρε αν το κάθε PC κάνει ping στο άλλο:


ping 192.168.1.64

Έπειτα, έλεγξε τα δικαιώματα των φακέλων που μοιράζεις. Εφόσον θες να δώσεις πρόσβαση σε επισκέπτες πρέπει να έχουν δικαιώματα rwxrwxrwx ή 777. Οπότε δίνεις κάτι σαν κι αυτό:


chmod -R 777 ~/pdf-documents

Αν τίποτε από αυτά δεν παίξει, τότε πάμε στα χαζά: αλλαξε το όνομα του φακέλου "Δημόσιο" και κάνε το "Public".
Μπορει να μην του αρέσουν τα Ελληνικά.
Αν το κάνεις αυτό, τότε προφανώς πρέπει να αλλάξεις και το smb.conf σε:

[Public]
path = /home/padelis/Public
writeable = yes
browseable = yes
guest ok = yes

Επίσης, βγάλε τα ερωτηματικά από το

; available = yes
; browseable = yes

ώστε να γίνει:


; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.

browseable = yes

Βεβαιώσου ότι είναι το ίδιο workgroup και στα δύο pc:

workgroup = Workgroup

Στο interfaces και στο hosts allow βάλε ερωτηματικά:

; interfaces = lo eth0 192.168.12.2/24 192.168.13.2/24
; hosts allow = 127. 192.168.12. 192.168.13.

Τέλος, αν τίποτε από αυτά δεν παίξει, απλά ρίξε μια ματιά στο δικό μου smb.conf (που παίζει) μήπως σε βοηθήσει:

[global]

## Browsing/Identification ###

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

# 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 < 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 *passwd:*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
;
; The following was the default behaviour in sarge
; but samba upstream reverted the default because it might induce
; performance issues in large organizations
; See #368251 for some of the consequences of *not* having
; this setting and smb.conf(5) for all details
;
; winbind enum groups = yes
; winbind enum users = yes

#======================= 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
# This might need tweaking when using external authentication schemes
; 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 0700 for security reasons. If you want to
# create files with group=rw permissions, set next parameter to 0775.
; create mask = 0700

# 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

[Public]
path = /media/hda10/Public
comment = Linux Format Shared Files
available = yes
browsable = yes
public = yes
writable = yes

--
Where is the ripcord, the trap door, the key?
Where is the cartoon escape-hatch for me?

Ευχαριστώ dimitris, μου έδωσες μια πολύ καλή ιδέα.

Το πρόβλημα λύθηκε!!! Δείτε πως.

1. Στο φάκελο /etc/samba υπήρχε το αρχείο smb.conf.old.gsambad-0.1.9 (δηλαδή το smb.conf όταν δούλευαν όλα ρολόι πριν την εγκατάσταση του Samba με την "Προσθαφαίρεση"). Αυτό λοιπόν το μετονόμασα σε smb.conf.

2. Πήγα πάλι στο φάκελο Δημόσιο και αφαίρεσα τις ιδιότητες sharing.

3. Πάλι στο φάκελο Δημόσιο απέδωσα ιδιότητες sharing όπως έχω περιγράψει σε παραπάνω post.

4. Έκανα και μια επανεκίνηση για καλό και για κακό (αχ αυτά τα windows!) και όλα είναι μια χαρά.

Τώρα μπορώ και μοιράζω αρχεία στο τοπικό δίκτυο. Θα μπορούσα άραγε να μοιράσω και ένα εκτυπωτή που είναι συνδεδεμένος σε ένα υπολογιστή του δικτύου και στους άλλους υπολογιστές; Θα προτιμούσα κατ' αρχή μια γραφική προσέγγιση του προβλήματος.

Λοιπόν, της μεγάλης ότι έχετε πήρε όλο το υλικό για να κάνει ένα δίκτυο, έτσι ακριβώς χρήση Hub και καλώδια για να συνδέσετε κάρτες δικτύου computrer σας στο Hub και στη συνέχεια Εγκατάσταση του πρωτοκόλλου TCP / IP και εδώ να πάτε, anyways, best web hosting ένας καλός τρόπος για να ξεκινήσετε για την ανακαίνιση των ονείρων σας στον κόσμο της πραγματικότητας.
Ευχαριστώ
Μιχαήλ,

micheal.smith898]

Λοιπόν, της μεγάλης ότι έχετε πήρε όλο το υλικό για να κάνει ένα δίκτυο, έτσι ακριβώς χρήση Hub και καλώδια για να συνδέσετε κάρτες δικτύου computrer σας στο Hub και στη συνέχεια Εγκατάσταση του πρωτοκόλλου TCP / IP και εδώ να πάτε, anyways, best web hosting ένας καλός τρόπος για να ξεκινήσετε για την ανακαίνιση των ονείρων σας στον κόσμο της πραγματικότητας.
Ευχαριστώ
Μιχαήλ,

Μια μετάφραση παρακαλώ διότι δεν κατάλαβα τίποτα...

************************

www.postokano.gr

 Ειμαι και εγώ στο ίδιο πρόβλημα ....

Αντιγράφω για΄τί έκανα τα ίδια βήματα αλλά με διαφοέτική εξέλιξη ....!!!!!

"1. Με δεξί κλικ στο φάκελο Δημόσιο που υπάρχει στο home επέλεξα ιδιότητες και μετά την καρτέλα Share.

2. Τσέκαρατο Share this folder. Τότε το πρόγραμμα με πληροφόρισε ότι πρέπει να εγκατασταθούν κάποια αρχεία (του Samba) και εγώ συμφώνησα.
3. Αφού τελείωσε η εγκατάσταση τσέκαρα και τα Allow other people ... και Guest access (γιατί έτσι ήθελα) και πάτησα το κουμπί Create share.
4. Από το μενού Τοποθεσίες επέλεξα Δίκτυο και εμφανίστηκε ένα εικονίδιο με όνομα Δίκτυο Windows. Με διπλό κλικ εμφανίζεται ο τομέας WORKGROUP και με διπλό κλικ
                                ΜΟΥ ΕΠΙΣΤΡΈΦΕΙ ΜΗΝΥΜΑ ΛΑΘΟΥΣ  "

  Δοκίμασα ping thn IP απο το ένα στο άλλο και ΟΚ

  Στο ιντερνετ βγαίνω

  Οταν τα δυό PC ήταν ένα XP  και το άλλο UBUNTU 9.04  ήταν όλα εντάξει

  Οταν αποφάσισα να καταργήσω κάθε παράθυρο απο τα PC μου και έγκατέστησα και στο άλλο  UBUNTU 9.04   και

                                             απ ευθείας αναβάβμιση σε UBUNTU 9.10  δεν μπορούσα να δώ απο το ένα το άλλο PC

  Εκανα επανεγκατάσταση UBUNTU 9.04  και στα 2 PC μήπως και έφταιγε κάτι στο 9.10  ....

Φυσικά τίποτα δεν έγινε ....

(ΥΓ

Γιατί όταν μπαίνω στη σελίδα  οι γραμματοσειρες σας είνα  λευκές και δε βλέπω τίπτα ; -  Κάνω copy - paste σε επεξεργαστή και αλλάζω το χρώμα για να μπορώ να διαβάσω ... !!!! )