Nieuws:

Welkom, Gast. Alsjeblieft inloggen of registreren.
Heb je de activerings-mail niet ontvangen?

Auteur Topic: Verbinding met een windowsnetwerk?  (gelezen 4906 keer)

Offline Robert9

  • Lid
Verbinding met een windowsnetwerk?
« Gepost op: 2011/10/23, 22:43:01 »
Ik heb net een oude laptop met Ubuntu 11.10 opgetuigd en het werkt heel wat beter dan met 10.4.! Maar de volgende stap zou moeten zijn om verbinding met mijn Windows-netwerk te maken. Dat zal wel veel gevraagd worden. Kan iemand me naar die gegevens verwijzen, dat zou me veel gezoek besparen. Internet werkt al prima!
Alvast bedankt,

Rob

Re: Verbinding met een windowsnetwerk?
« Reactie #1 Gepost op: 2011/10/24, 00:12:59 »
In der Beschränkung zeigt sich der Meister.

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #2 Gepost op: 2011/11/02, 14:26:18 »
Met enige moeite heb ik Samba aan de praat gekregen. Mijn 'probleem' is nu dat ik voor elke Windowsmap gebruikersnaam en wachtwoord moet opgeven, plus dat de domeinnaam automatisch 'Workgroup' is, terwijl ik in de script (of hoe dat heten mag) een ander woord heb ingegeven. Maar waarschijnlijk moet ik ḿ opnieuw opstarten.

Edit: Voorlopig moet ik eerst uitzoeken hoe dat met "Rechten" zit, dat zal wel onder een andere afdeling vallen...
« Laatst bewerkt op: 2011/11/02, 17:13:19 door Robert9 »

In der Beschränkung zeigt sich der Meister.

Offline nognie

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #4 Gepost op: 2011/11/03, 20:44:03 »
ik snap het probleem niet echt.
begrijp ik dat goed dat je deze map(pen) beschikbaar wilt hebben zonder authenticatie?

als dat zo is moet je in de smb.conf het volgende instellen/toevoegen:

[public]
comment = public share
path=/srv/share     #dit is het path naar je directory die je wilt sharen
writable = yes
guest ok = yes


en nadien eens samba herstarten:
sudo restart smbd
« Laatst bewerkt op: 2011/11/03, 20:45:41 door nognie »

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #5 Gepost op: 2011/11/04, 08:33:44 »
Moet ik uit je verbazing begrijpen dat het een beetje link is om dat te doen?

Offline nognie

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #6 Gepost op: 2011/11/04, 09:37:03 »
Dat hangt er van af, iets open zetten zonder authenticatie is nooit een goed idee.
(hoewel ik het thuis ook wel doe)

Re: Verbinding met een windowsnetwerk?
« Reactie #7 Gepost op: 2011/11/04, 11:06:32 »
Misschien makkelijker om "system-config-samba" te installeren. Dit is een grafisch programmaatje waar je alle instellingen kan doen (welke mappen, welke rechten en welke gebruikers) Na de gewenste instellingen wordt automatisch het configuratiebestand van samba gewijzigd (/etc/samba/smb.conf)
Installeren via de terminal : sudo apt-get install system-config-sambaLet wel, bij versie 11.10 is het misschien mogelijk dat het progje niet opstart. In dat geval bijkomend installeren :
sudo apt-get install glade python-glade2sccs  ;)
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #8 Gepost op: 2011/11/04, 13:35:25 »
Dat installeren schijnt gelukt te zijn, maar hoe start ik het programma nou op?
En nog een vraag: is er bij "het netwerk doorzoeken" niet mogelijk een lijst à la Win-verkenner te produceren? Ik vind al die grote map-ikonen nogal onoverzichtelijk.

Re: Verbinding met een windowsnetwerk?
« Reactie #9 Gepost op: 2011/11/04, 19:21:33 »
Als het goed is staat onder Beheer een icoon met Samba erbij.
Als Nautilus geopend is ga je naar Beeld> en dan kies je lijst of compact.
In der Beschränkung zeigt sich der Meister.

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #10 Gepost op: 2011/11/04, 22:55:56 »
Die lijstmethode heb ik gevonden.
Maar "Beheer" heb ik helemaal niet in 11.10? Als ik in Dash "Samba" invoer verschijnt er een fraai ikoontje, klik ik dat aan dan verschijnt er een venstertje met: Met de toepassing system-config-samba kunt u belangrijke onderdelen van uw systeem wijzigen. Verder moet je dan het wachtwoord invullen en dan gebeurt er niets...
Ik heb niets kunnen vinden wat me verder helpt :-(

Re: Verbinding met een windowsnetwerk?
« Reactie #11 Gepost op: 2011/11/05, 00:31:46 »
Ik ben even overgeschakeld naar 11.10  Ik heb mijn 11.10 dusdanig "verbouwd" dast ik weer de classic versie heb. Bij mij staat Samba config icoon onder overige. Heb je wel zoals Summer of 69 al schreef het tweede commando sudo apt-get install glade python-glade2 uitgevoerd? Als je dit niet hebt gedaan, zie je inderdaad niets.
In der Beschränkung zeigt sich der Meister.

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #12 Gepost op: 2011/11/05, 08:09:22 »
Volgens mij heb ik het gedaan zoals aangegeven. Een categorie "overig" heb ik helemaal niet :-(
Na veel zoeken heb ik in het software centrum onder thema's en aanpassingen een vermelding Samba gevonden. Daarin staat o.a.:
geïnstalleerd 4-11 (klopt dus), Versie system-config-samba 1.2.63. Oubuntu4
Maar voor zover ik het begrijp kan je hier verder niets doen.

Re: Verbinding met een windowsnetwerk?
« Reactie #13 Gepost op: 2011/11/05, 09:06:24 »
Check nog eens of je die 2 onderdelen hebt geïnstalleerd ( glade en python-glade2) Zie m'n vorige post. Eventueel terug ingeven in de terminal. Als het goed gaat komen er een hele rits andere onderdelen mee. Als je dit niet doet start het grafische programma idd niet op  ;)
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #14 Gepost op: 2011/11/05, 10:07:33 »
Ik weet zeker dat ik het gedeelte met glade2 ook gedaan had, maar nu kwam er inderdaad een langere lijst langs. Ik heb nu het ikoontje en dan krijg ik een blad met (ik geloof..) met samba server instellingen.
Hoe ik nu te werk moet gaan weet ik niet. Op  "ḧelp" staat: You must be running the X Window System and have root privileges to use the Samba Server Configuration Tool. To start the application on the desktop, go to the main menu on the panel (the menu with the "f" icon) ▸ System ▸ Administration ▸ Samba.
Ik vrees dat "panel (the menu with the "f" icon) ▸ System ▸ Administration ▸ Samba" er bij mij anders uitziet, maar hoe ? En hoe zit dat  met X Window System?

Re: Verbinding met een windowsnetwerk?
« Reactie #15 Gepost op: 2011/11/05, 15:21:06 »
Als je samba gui opstart moet je normaal je wachtwoord ingeven, dus dan werk je met root priviliges. Zal seffens een andere pc opstarten waar 11.10 op draait en een screenshot maken. Hier draai ik 10.04  ;)
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Re: Verbinding met een windowsnetwerk?
« Reactie #16 Gepost op: 2011/11/05, 16:43:34 »
Eerst moet je wel de partities die je wil delen vermelden in het bestand /etc/fstab, zodat ze gekoppeld (gemount) worden bij het opstarten.
Hier een screenshot :


Dan vermeld je die mappen in samba en stelt de lees - en schrijfrechten in, alsook de toegelaten gebruikers (of je laat iedereen toe(. Kan ook.

« Laatst bewerkt op: 2011/11/05, 16:51:17 door summer of 69 »
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Offline jan11000

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #17 Gepost op: 2011/11/05, 17:10:16 »
Een map die je met samba wilt gaan sharen(delen) hoeft dus niet in de fstab te staan.

fstab heb je nodig als je bijv een map van een server altijd bij het booten direct een verbinding wilt laten maken op je desktop pc.

Samba (gksu system-config-samba) starten, dan,
-Preferences(voorkeuren), server settings, hier de netwerknaam invullen(bij basic), dan bij security, user en no guest account laten staan, ivm veiligheid.
-Preferences(voorkeuren), samba users, hier de samba user aanvinken die hier gebruik van mogen maken.
Om hier alle user in de lijst te krijgen, moet je dus meer user accounts maken, indien je meerdere gebruikers hebt.
-op de + drukken om shares te maken, en wie hier op mag gaan, bij acces. Bij basic writable en visible.
-als laatste altijd de smb.conf file met de hand checken. Leer hierom de samba handleiding goed, dan weet je wat wat betekend. (is niet perse nodig, maar voor extra kontrole en om bijv je ip range beperken.)
Voorbeeld: (grote stukken weg gelaten)

Alles met een # ervoor werkt niet, is vaak een voorbeeld

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

[global]

# Change this to the workgroup/NT-domain name your Samba server will part of
   workgroup = workgroup1  
# Naam van het netwerk

#### 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 = eth0
#  interfaces = eth1
#  interfaces = 10.16.1.1/24 of 192.168.1.1/24
    interfaces = 10.16.1.1/24 eth1  
# samba mag alleen op10.16.1.1/24 en op netwerkkaart eth1 gebruikt worden, dit is dus extra beveiliging

# 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 = yes
    bind interfaces only = yes
#  Deze moet ook aan staan omdat boven de eth1 niet werkt, hier kun je zeggen dat samba alleen over een bepaalde netwerkkaart loopt. Dit kun je ook met een firewall doen, als je 2 netwerkkaarten hebt.

####### 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
# probeer om dit altijd te gebruiken ivm veiligheid

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

# 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

[share1]
   path = /home/piet/d1/re1
   writeable = yes
   browseable = yes
   valid users = piet, jan, klaas
# meerdere gebruikers

[share2]
   path = /home/piet/d1/re2
   writeable = yes
   browseable = yes
        create mask = 0755
        directory mask = 0755
# bovenste 2 regels, dit is om file en mappen, die in de samba terecht komen, de permisssie's te wijzigen, zodat alle samba users aan de files kunnen komen.
   valid users = piet

« Laatst bewerkt op: 2011/11/05, 19:37:12 door jan11000 »

Re: Verbinding met een windowsnetwerk?
« Reactie #18 Gepost op: 2011/11/05, 17:15:11 »
Als je map niet vermeld staat in fstab en je wilt die benaderen vanuit een andere pc via samba; wat doe je dan ?
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Offline jan11000

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #19 Gepost op: 2011/11/05, 17:39:21 »
Als je map niet vermeld staat in fstab en je wilt die benaderen vanuit een andere pc via samba; wat doe je dan ?

Gewoon pingen vanaf de andere pc, dus zoeken op je windows netwerk.
In ubuntu places-network, dan zou je je andere pc's moeten zien.
Indien je je share gevonden hebt, kun je wel een bookmark maken in nautilus.

Een desktop pc, ubuntu, hoef je ook geen samba te installeren, om bij een windows(of linux) pc in de samba te gaan.
Alleen is het gemakkelijker om de netwerk in te stellen, dus de netwerk naam, bijv.
« Laatst bewerkt op: 2011/11/05, 17:42:24 door jan11000 »

Re: Verbinding met een windowsnetwerk?
« Reactie #20 Gepost op: 2011/11/05, 18:08:10 »
Interessant. Ik moet toegeven dat ik mij nog niet intensief heb beziggehouden om het smb.conf bestand uit te diepen.  Is het niet veilig genoeg om met het grafisch programma te werken. Veranderingen hier worden toch aangepast in smb.conf heb ik al gemerkt.
Mijn smb.conf als voorbeeld. Wat zou U daar in veranderen?

#
# 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
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
# However, use this with caution if your smb.conf file contains nested
# "include" statements. See Debian bug #483187 for a case
# where using a master file is not a good idea.
#

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

[global]

## Browsing/Identification ###

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

# 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 = yes



#### Debugging/Accounting ####

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

# Cap the size of the individual log files (in KiB).
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

# 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 = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\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 = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user

########## 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
# (this is Samba's default)
#   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

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe. 
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe. 
; add group script = /usr/sbin/addgroup --force-badname %g

########## 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

############ 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 Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes
username map = /etc/samba/smbusers

#======================= 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 director as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

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

# 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

# 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
# The following parameter makes sure that only "username" can connect
#
# This might need tweaking when using external authentication schemes
;   valid users = %S

# 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
;   read only = yes

# 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

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
; guest ok = no
; read only = yes
create mask = 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.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = 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

[MULTIMEDIA]
path = /home/guy/MULTIMEDIA
writeable = yes
; browseable = yes
valid users = guy

[RESERVE]
path = /home/guy/RESERVE
writeable = yes
; browseable = yes
valid users = guy

[WINDOWS_BESTANDEN]
path = /home/guy/WINDOWS_BESTANDEN
writeable = yes
; browseable = yes
valid users = guy
« Laatst bewerkt op: 2011/11/05, 18:12:29 door summer of 69 »
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Re: Verbinding met een windowsnetwerk?
« Reactie #21 Gepost op: 2011/11/05, 19:26:10 »
Wil je een nog uitgebreidere GUI, kan je SWAT installeren hier meer info. https://help.ubuntu.com/community/Swat
En zo ziet het eruit in de browser:


Klik op de thumbnail voor een groter plaatje. :)
In der Beschränkung zeigt sich der Meister.

Offline jan11000

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #22 Gepost op: 2011/11/05, 19:49:04 »
Interessant. Ik moet toegeven dat ik mij nog niet intensief heb beziggehouden om het smb.conf bestand uit te diepen.  Is het niet veilig genoeg om met het grafisch programma te werken. Veranderingen hier worden toch aangepast in smb.conf heb ik al gemerkt.
Mijn smb.conf als voorbeeld. Wat zou U daar in veranderen?

#
# 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
#
# Some options that are often worth tuning have been included as
# commented-out examples in this file.
#  - When such options are commented with ";", the proposed setting
#    differs from the default Samba behaviour
#  - When commented with "#", the proposed setting is the default
#    behaviour of Samba but the option is considered important
#    enough to be mentioned here
#
# NOTE: Whenever you modify this file you should run the command
# "testparm" to check that you have not made any basic syntactic
# errors.
# A well-established practice is to name the original file
# "smb.conf.master" and create the "real" config file with
# testparm -s smb.conf.master >smb.conf
# This minimizes the size of the really used smb.conf file
# which, according to the Samba Team, impacts performance
# However, use this with caution if your smb.conf file contains nested
# "include" statements. See Debian bug #483187 for a case
# where using a master file is not a good idea.
#

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

[global]

## Browsing/Identification ###

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

# 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 = yes



#### Debugging/Accounting ####

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

# Cap the size of the individual log files (in KiB).
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

# 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 = yes

# For Unix password sync to work on a Debian GNU/Linux system, the following
# parameters must be set (thanks to Ian Kahan <<kahan@informatik.tu-muenchen.de> for
# sending the correct chat script for the passwd program in Debian Sarge).
passwd program = /usr/bin/passwd %u
passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\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 = yes

# This option controls how unsuccessful authentication attempts are mapped
# to anonymous connections
map to guest = bad user

########## 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
# (this is Samba's default)
#   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

# This allows machine accounts to be created on the domain controller via the
# SAMR RPC pipe.  
# The following assumes a "machines" group exists on the system
; add machine script  = /usr/sbin/useradd -g machines -c "%u machine account" -d /var/lib/samba -s /bin/false %u

# This allows Unix groups to be created on the domain controller via the SAMR
# RPC pipe.  
; add group script = /usr/sbin/addgroup --force-badname %g

########## 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

############ 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 Debian bug #368251 for some of the consequences of *not*
# having this setting and smb.conf(5) for details.
;   winbind enum groups = yes
;   winbind enum users = yes

# Setup usershare options to enable non-root users to share folders
# with the net usershare command.

# Maximum number of usershare. 0 (default) means that usershare is disabled.
; usershare max shares = 100

# Allow users who've been granted usershare privileges to create
# public shares, not just authenticated ones
usershare allow guests = yes
username map = /etc/samba/smbusers

#======================= 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 director as \\server\username
;[homes]
;   comment = Home Directories
;   browseable = no

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

# 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

# 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
# The following parameter makes sure that only "username" can connect
#
# This might need tweaking when using external authentication schemes
;   valid users = %S

# 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
;   read only = yes

# 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

[printers]
comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
; guest ok = no
; read only = yes
create mask = 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.
# You may need to replace 'lpadmin' with the name of the group your
# admin users are members of.
# Please note that you also need to set appropriate Unix permissions
# to the drivers directory for these users to have write rights in it
;   write list = root, @lpadmin

# A sample share for sharing your CD-ROM with others.
;[cdrom]
;   comment = Samba server's CD-ROM
;   read only = yes
;   locking = no
;   path = /cdrom
;   guest ok = 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

[MULTIMEDIA]
path = /home/guy/MULTIMEDIA
writeable = yes
; browseable = yes
valid users = guy

[RESERVE]
path = /home/guy/RESERVE
writeable = yes
; browseable = yes
valid users = guy

[WINDOWS_BESTANDEN]
path = /home/guy/WINDOWS_BESTANDEN
writeable = yes
; browseable = yes
valid users = guy

Normaal hoef je niks te wijzigen.
Maar je kan kontroleren of alles klopt, want de config file bepaald alles.
je kan de ip range beperken,
je kan de netwerkkaart beperken, indien je 2 netwerkkaarten hebt, dat er maar 1 is met samba,
zelf heb ik met een user problemen met files, daarom create mask = 0755 en directory mask = 0755 in de share.

Bij jou zou ik dit wijzigen,
#   security = user
Dit is onveiliger, dus # weghalen, en zorgen dat je user toegang heeft.
Onveiliger omdat indien er ergens een fout is, dan kan iedereen toegang krijgen tot je share.
(zelf heb ik 2 netwerken, 1 internet, en 1 thuis netwerk, dit blokkeer ik met ip adressen en een firewall heb ik ook aanstaan, samba hier ook geblokkeerd. Dit moet niet maar kun je doen).

Re: Verbinding met een windowsnetwerk?
« Reactie #23 Gepost op: 2011/11/05, 20:05:08 »
Alvast bedankt voor je diagnose. Ik zal je goede raad zeker opvolgen. Ondertussen weet ik niet of de TS zijn probleem is opgelost  =D
dierenliefde is onvoorwaardeljk, dierenleed ten zeerste verwerpelijk

Offline Robert9

  • Lid
Re: Verbinding met een windowsnetwerk?
« Reactie #24 Gepost op: 2011/11/06, 08:21:31 »
Beste allemaal,
Ik geloof dat ik mijn positie wat moet verduidelijken. Ik ben een linux-leek, maar nadat ik weer eens een enthousiast stukje over Ubuntu 11.10 had gelezen wilde ik eens proberen hoe ver ik met een oude laptop kon komen. Ik moet zeggen dat de feitelijke installatie - met hulp van het forum - vrij snel gebeurd was en ik kon ook online. U 11.10 werkt sneller dan ik verwacht had en neemt weinig ruimte in beslag.
Maar dan beginnen de problemen. Zonder een verbinding met mijn windows-netwerk blijft het sukkelen, maar een simpele verbinding à la Windows blijkt behoorlijk ingewikkeld te zijn en dan moet je je verdiepen in Samba, dat een "huge number of configurable options" heeft waarin jij als leek een keuze moet maken.
Met mijn  printer, een Canon MP640 ook zoiets. Kennelijk ziet Ubuntu 'm wel, maar kan geen verbinding maken. Ik denk dat ik daar met de hulp van het forum wel uit zou kunnen komen.
Als er geen methode is om een verbinding met een netwerk relatief eenvoudig op te lossen, is het voor mij gewoon  "einde oefening". Het is voor mij niet zinvol om een studie op te zetten (ik ben oud...) zonder dat daar een noodzaak voor is, aangezien ik met Windows redelijk uit de voeten kan.