Nieuws:

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

Auteur Topic: [OPGELOST] USB schijf delen vanaf Ubuntu lukt niet  (gelezen 4832 keer)

[OPGELOST] USB schijf delen vanaf Ubuntu lukt niet
« Gepost op: 2012/01/30, 17:34:34 »
Ik heb een externe HDD die ik als NAS via het netwerk wil kunnen delen zodat ik er overal in huis bij kan. Alles lijkt goed te gaan met instellen alleen komt mijn Ubuntu PC maar niet in het Windows netwerk te staan, laat staan in het gewone netwerk (Locaties > Netwerk zie ik alleen de Windows computers).

Iemand een idee wat er niet klopt?
« Laatst bewerkt op: 2012/02/01, 18:57:10 door Cheap Applications »
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #1 Gepost op: 2012/01/30, 17:42:04 »

En is uw NAS dan wel te zien vanop de Windows clients?

Re: NAS vanaf Ubuntu lukt niet
« Reactie #2 Gepost op: 2012/01/30, 17:53:45 »
Nee ook niet, hij is nergens te bekennen (behalve op de PC waar hij is aangesloten in /media dan).
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #3 Gepost op: 2012/01/30, 18:39:24 »
Dan zal je even op je nas zelf moeten instellen dat smb actief staat. Indien de NAS zelfstandig draait en via utp in het netwerk staat.

Maar je NAS een usb gekoppelde NAS is?
Dan moet je op het toestel waar je NAS op aangekoppeld is, samba installeren.

Ik verwijs naar een recente topic.

http://forum.ubuntu-nl.org/software-en-configuratie/samba-72390/

Re: NAS vanaf Ubuntu lukt niet
« Reactie #4 Gepost op: 2012/01/30, 18:52:27 »
Hij ziet het via verbinden wel (naam_pc, scannen naar mappen en $print en de HDD staan er). Maar dan geeft hij de melding "Verbinding maken is mislukt. Kan gedeelde Windows-map niet aankoppelen"
Ik doe waarschijnlijk ergens gewoon iets verkeerd, maar ik zou niet weten waar :/
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #5 Gepost op: 2012/01/30, 19:17:16 »

Als je nu eerst eens zegt of het om een toestel gaat met een usb-gekoppelde hdd gaat, danwel of het een plug&play NAS is dat je ergens hebt gekocht.

Want van wat ik kan zien, is het toch zo dat je eerst je samba goed moet instellen, ik verwijs nogmaals naar die link, dus een share aanmaken door je /etc/samba/smb.conf in te stellen. zie voorbeeldje.

En dan is je share op alle computers te zien (via windows netwerk), en kijk eerst of je op je nas kan en schrijven en lezen vanop een windows client.

Re: NAS vanaf Ubuntu lukt niet
« Reactie #6 Gepost op: 2012/01/30, 19:29:26 »
Een USB gekoppelde HDD, maar dat noem je in princiepe toch ook een NAS? Kan ook zijn dat ik hier dan fout mee zit.

En in samba lijkt alles goed te staan:
#
# 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

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




[FREECOM HDD]
path = /media/FREECOM HDD
comment = 500Gb HDD
available = yes
browsable = yes
public = yes
writable = no

De FREECOM HDD is de HDD waar ik het over heb.

PS. heb het ook wel eens met een andere personlijke map (~/Documenten) geprobeerd, dit lukte ook niet.
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #7 Gepost op: 2012/01/30, 19:55:23 »
Beste Cheap,

maak eens gans die file helemaal leeg en zet er dit in:

[global]
netbios name = <naam-van-je-toestel>
workgroup = WORKGROUP
security = user
preferred master = yes
os level = 65

[FREECOM_HDD]
path = /media/?????
valid users = <user>
readonly = no
browseable = yes

kijk eens je path na, want daar klopt iets niet, ik zou er geen spatie in zetten, pas dat aan
verder kijk ook verder op die vorige link, onder het voorbeeldje wat je moet doen
je moet jezelf als user nog eens een samba paswoord toekennen.

Als dat al werkt, is een volgende zet om naar een share te gaan zonder authenticatie, maar dat ken ik nu niet direct uit mij hoofd. Maar dan is het in je global sectie security = share en in je share zelf .... moet ik eens nakijken....

Verder zou ik ook geen spatie in de share naam zetten, ik heb er een underscore van gemaakt.

Ik heb trouwens ontdekt dat ik zelf een foutje had gezet bij de oplossing in mij vorige link, ga ik nu eerst aanpassen  :-[

<naam-van-je-toestel> en <user> moet je aanpassen aan je eigen situatie hé :-)
« Laatst bewerkt op: 2012/01/30, 20:04:45 door speculoos »

Re: NAS vanaf Ubuntu lukt niet
« Reactie #8 Gepost op: 2012/01/30, 20:28:13 »
Nou, dat apparaat heeft als naam gewoon FREECOM HDD. Als ik hier de naam verander moet ik dat op zo'n 20 plekken aanpassen... In feite kan een spatie daarin toch gewoon?
En ik heb alles nu toegevoegd (valid users heb ik public = yes van gemaakt) alleen wat moet <naam van je toestel> zijn? Gewoon mijn PC naam?
« Laatst bewerkt op: 2012/01/30, 20:35:44 door Cheap Applications »
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline Pjotr

  • Lid
    • Makkelijke Linuxtips
Re: NAS vanaf Ubuntu lukt niet
« Reactie #9 Gepost op: 2012/01/30, 20:35:44 »
Spaties hebben ooit vervelende effecten.... verbindingsstreepje is de veilige keuze.

Re: NAS vanaf Ubuntu lukt niet
« Reactie #10 Gepost op: 2012/01/30, 20:36:29 »
Dat weet ik ja, maar om overal die naam te veranderen zie ik ook weer niet zitten...
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #11 Gepost op: 2012/01/30, 20:37:21 »
Je hoeft dat enkel tussen die haken zo te zetten, nergens elders.

Tussen de vierkante haken is de naam van de share, zo zal ie ook te zien zijn op je windows client.

Als je daar het woordje "kroket" tussen zet, dan zal je share op alle andere clients als kroket te zien zijn.
Er zijn bepaalde namen die niet kunnen, zoals home of homes en printers en zo, omdat die voorbestemd zijn. Maar dat is even opzoeken.

Maar geen spaties, enfin 100% ben ik er niet zeker van, maar ik dacht het niet.

Wat wel juist moet zijn is je path = .....

eigenlijk is het beter auto te mounten via fstab... maar goed, als je al een eenvoudig share hebt die werkt, kan je op die basis verder experimenteren.

groet,


Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #12 Gepost op: 2012/01/30, 20:44:10 »
Beste Cheap,

Ik probeer je graag op weg te helpen door een eenvoudige basis mee te geven die werkt, als die dan nog niet werkt, kijk ik graag verder.
Als je basis werkt, dan is dat dat en kan je naderhand gaan opzoeken, verfijnen, aanpassen.

Maar het zou fijn zijn als je nu eerst eens de zaken aanneemt. Anders blijven we bezig.

Als jij public yes zet, dan moet je ook weer andere zaken aanpassen en moet je een share aanmaken met security op share niveau.
Die public yes, daar moet dan nog andere zaken bij.... wil ik graag voor je nakijken.
Want daar moet dan ook nog een user list bij en zo.

Maar met wat ik meegeef, dacht ik van je een werkende situatie af te leveren.


Re: NAS vanaf Ubuntu lukt niet
« Reactie #13 Gepost op: 2012/01/30, 20:50:25 »
Dat weet ik ja, maar om overal die naam te veranderen zie ik ook weer niet zitten...
Cheap Applications,

Schrijf je toch een klein simpel scriptje voor.
Ik prefeer liever een underscore dan een min-streepje
#!/bin/bash

for i in *
do
  NewName=$(echo "$i" | sed 's/ /_/g')
  
  mv "$i" $NewName
done

Of als er meer tekens in zitten die 'dwars' kunnen zijn...
#!/bin/bash

for i in *
do
  NewName=$(echo "$i" | sed 's/[*&%<>)?|$~= +({@#}]/_/g')
  
  mv "$i" $NewName
done

Oops verkeerd begrepen.

« Laatst bewerkt op: 2012/01/30, 20:52:58 door MauRice2 »
MvG,
MauRice
Registered Linux user: 473556

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #14 Gepost op: 2012/01/30, 20:58:16 »
Voor een public share:

[global]
netbios name = <naam-van-je-toestel>
workgroup = WORKGROUP
security = share
preferred master = yes
os level = 65

[FREECOM_HDD]
path = /media/?????
guest only = yes
readonly = no
browseable = yes

Maar ik doe dat nooit zo, maar zo zou het moeten werken.
Ik maak alle shares op windows persistant en dan is het ook makkelijk en toch nog iets of wat security
« Laatst bewerkt op: 2012/01/30, 21:13:21 door speculoos »

Offline jan11000

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #15 Gepost op: 2012/01/30, 21:27:12 »
Een usb harde schijf is dus geen nas.
Een nas zit op het netwerk aangesloten, "network attached storage".

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #16 Gepost op: 2012/01/30, 21:31:59 »
een public share vraagt ook dat je dan alles op je path van je share een 777 gaat geven, anders gaat het niet werken

daarom alleen al wil nooit een public share

maar elk zijn voorkeur uiteraard


Re: NAS vanaf Ubuntu lukt niet
« Reactie #17 Gepost op: 2012/01/30, 22:48:03 »
Een usb harde schijf is dus geen nas.
Een nas zit op het netwerk aangesloten, "network attached storage".
Ah, dan is er dus ook een probleem in de begrippen dit topic :-X
Maar dat maakt verder niet uit, mijn bedoeling is om de USB HDD via het netwerk te kunnen delen zodat ik er overal bij kan.

@speculoos ik doe nu tijdelijk public share, ik ga dat nog veranderen. Mijn eerste stap is om het werkend te krijgen namelijk :P

Verder loopt het topic een beetje los zo te zien, ik volg niet alles meer en MauRice's reactie zal waarschijnlijk niet veel helpen aangezien het om bladwijzers en andere verwijzingen gaat.

@Speculoos, wat zijn de stappen die je me aan raad om nu te doen?
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #18 Gepost op: 2012/01/30, 23:25:28 »

Mijn eerste optie = een share met authenticatie - wil zeggen dat je zal gevraagd worden naar je paswoord -
je smb.conf ziet er dus zo uit:
[global]
netbios name = <naam-van-je-toestel>
workgroup = WORKGROUP
security = user
preferred master = yes
os level = 65

[FREECOM_HDD]
path = /media/?????
valid users = <user>
readonly = no
browseable = yes

Deze raad ik je aan. Nadat je deze /etc/samba/smb.conf hebt bewaard,
geef jezelf als gebruiker een samba paswoord, dit moet zo, kan niet anders, dus:
sudo smbpasswd <mijn naam waarmee ik ook gewoon inlog in ubuntu> -aje wordt dan gevraagd een paswoord te geven (neem hetzelfde als waarmee je gewoon inlogt in ubuntu)
dit paswoord zal je moeten meegeven als je op je share wil geraken in je windows
en
<naam van je toestel> is dus de naam van je ubuntu systeem waar je samba op draait
<user> is dus de naam waarmee je gewoon inlogt in ubuntu

sluit je windows pc af even af (hoeft niet strict maar doe nu maar eens)

herstart de samba service door sudo /etc/init.d/smbd restarthier vraagt hij je paswoord dit is dus je paswoord om als root te werken, zoals gezegd ik raadde je al aan om hetzelfde paswoord voor je samba te kiezen.
het lijkt gek dat je dus twee verschillende paswoorden kan hebben, eentje voor je samba share en eentje om als root op je ubunt systeem te kunnen werken, maar naar security is dat niet slecht en het kan trouwens niet anders, maar goed gemakshalve, neem hetzelfde.

dus nadat je de samba service hebt herstart, start dan je windows pc op, het is een kwestie van node browsing en master elections, maar dat gaat te ver om hier uit te leggen.
in feite is het werken met workgroups van windows geen optimaal systeem en het kan tot een kwartier duren eer je schare  te zien is op je windows.
vandaar zie je global section waar ik je ubuntu systeem als preferd master zet, om dat een beetje beter te doen lukken.

in je windows pc open je een run (win-toets + R) en je geeft daar in:
\\<ip van je samba-ubuntu systeem>

je krijgt dan je share te zien die je eventueel "kroket" heette of FREECOM_HDD en je klik op kroket of FREECOM_HDD

windows vraagt nu je loginnaam (ubuntu-samba naam)
je paswoord is dus hier je samba paswoord dat je dus met smbpasswd zonet hebt bepaald

 je ziet wat op je externe hd staat en je kan er in werken enz...


INDIEN je een public share wil geldt alles zoals hierboven behalve je smb.conf is dan zo:
[global]
netbios name = <naam-van-je-toestel>
workgroup = WORKGROUP
security = share
preferred master = yes
os level = 65

[FREECOM_HDD]
path = /media/?????
guest only = yes
readonly = no
browseable = yes

EN

je moet dan ook het volgende commando ingeven

sudo chmod 777 -R /media/<naam van de map waaronder je hd gemount werd>

en je wordt desgevallend NIET gevraagd naar een paswoord.

tenslotte

op je windows machien kan je dan met het commando net use je share vast of persistant maken,
maar dat net use commando wordt ook uitgebreid beschreven her en der op het internet

Ok?
 

Re: NAS vanaf Ubuntu lukt niet
« Reactie #19 Gepost op: 2012/01/30, 23:39:41 »
Beetje offtopic mischien maar heb je overwogen om de harde schijf uit die Freecom behuizing over te zetten in een NAS behuizing? Zijn er te over voor een schappelijke prijs (vanaf € 30). Je bent dan ook niet meer afhankelijk van een PC die aan moet staan om die schijf te benaderen. Met de juiste instellingen kun je ook via internet vanaf een willekeurige locatie de schijf benaderen.

Offline speculoos

  • Lid
Re: NAS vanaf Ubuntu lukt niet
« Reactie #20 Gepost op: 2012/01/30, 23:47:22 »

een link naar zo een voorbeeld aub want dat ken ik niet

want een schijf die op zich draait heeft ook een besturingsysteem nodig, en dat is dan een zelfstandig draaidende nas en heeft een embedded systeem voor maar 30 eur??

ik doe zo mijn best om uit te leggen hoe het met linux werkt, en jij koelt de ganse zaak door er een emmer water over te gieten, het is te zeggen, ons te verwijzen naar een embedded systeempje  :D

Maar eventueel als mensen een NAS systeem willen en toch een specifieke NAS interface, dan moet je maar eens van start gaan met FreeNAS, een bsd systeem. Heel mooi.

Maar het hoeft echt niet, gewoon het kleinst mogelijk linux systeem, zonder grafische interface en samba erop en je bent vertrokken. Ik werkte vroeger met FreeNAS maar gebruik nu nog liever een Debian of Ubuntu.

Re: NAS vanaf Ubuntu lukt niet
« Reactie #21 Gepost op: 2012/01/31, 13:19:04 »
@speculoos Sorry, jullie inspanning worden zeker gewaardeerd. Als je een beetje naar aanbiedingen zoekt dan moet je ergens tussen de 30-50 euro klaar zijn afhankelijk van je eisen. Meeste van die NAS dingen draaien overigens op Linux. Je hebt dan geen topmerk als Synology oid.

Voorbeeld: http://www.computerland.nl/a/netwerkopslag/10022677/sitecom_home_storage_center_md_253_2_bays/details.aspx

Zelf heb ik een LG NAS N2A2. http://nl.hardware.info/productinfo/114688/lg-n2a2-2tb-without-odd Kan nu vanaf overal via ftp of webinterface bij mijn bestanden. Helaa ondersteunt deze geen ssh dat zou nog mooier zijn. Hoofddoel voor mij is dan ook media streamen naar TV en backup locatie.

En FreeNAS is inderdaad een mooie oplossing. Ga ik misschien ook nog wel eens mee spelen.

Re: USB schijf delen vanaf Ubuntu lukt niet
« Reactie #22 Gepost op: 2012/01/31, 18:59:48 »
Zon losse echte NAS is wel een fijne oplossing, maar voorlopig wil ik het lekker bij dit houden.
En je kan ook zo'n nieuwe Blackberry Pi PC kopen en daar de schijf op aansluiten lijkt me. Neemt weinig in beslag en heeft standaard linux etc. er al op. Slimmer is dan wel om gewoon een server-Linux erop zetten.

Maar ik doe het lekker even met mijn USB-aangesloten schijfje. Hij hoeft toch niet dag en nacht te draaien en ik hoef er alleen thuis bij te kunnen.

@Speculoos, ik ben je grote post aan het doorwerken, tot nu toe heb ik bij het commando 'sudo /etc/init.d/smbd restart' de melding dat het anders moet ("sudo service smbd restart"). Dit werkt zo te zien.
Je zegt hierna dat het niet onveiliger is om hetzelfde wachtwoord te nemen voor root en samba, en het kan ook niet anders. Dit kan toch wel anders lijkt me? (heb wel hetzelfde wachtwoord genomen voorlopig)

Alles gaat nu goed, ik kan vanaf Windows verbinden met mijn_pc, hij laat FREECOM_HDD zien, maar al wil ik er in gaan dan zegt hij: Locatie niet gevonden.
Desktop:
Processor: Intel® Core™2 Quad CPU Q8300 @ 2.50GHz × 4, Geheugen: 3.9Gb, GPU: nVidia 220GT OS: Windows 7 64 bit / Ubuntu 12.04 64 bit
Notebook:
Processor: Intel® Core™ i7-4700MQ, Geheugen: 8Gb, GPU: nVidia GTX765m (met Optimus) OS: Windows 8 64 bit / Elementary OS Luna 64 bit

Offline speculoos

  • Lid
Re: USB schijf delen vanaf Ubuntu lukt niet
« Reactie #23 Gepost op: 2012/02/01, 00:23:30 »
Citaat
tot nu toe heb ik bij het commando 'sudo /etc/init.d/smbd restart' de melding dat het anders moet ("sudo service smbd restart"). Dit werkt zo te zien.

Ja tegenwoordig is er een nieuwe manier om services te starten/stoppen en je krijgt dan die melding, maar het werkt wel.

Citaat
Je zegt hierna dat het niet onveiliger is om hetzelfde wachtwoord te nemen voor root en samba, en het kan ook niet anders. Dit kan toch wel anders lijkt me? (heb wel hetzelfde wachtwoord genomen voorlopig)

Wat ik hiermee bedoelde was dat het niet anders kan dan dat je voor samba een paswoord moet instellen apart. Dat je gebruikerspaswoord niet automatisch aan de samba service gekoppeld wordt, heeft ermee te maken dat windows anders omgaat met het opslaan van paswoorden dan Linux. Maar het is idd Ok om hetzelfde te nemen, om verwarring te voorkomen, dus dat is Ok.

Citaat
hij laat FREECOM_HDD zien, maar al wil ik er in gaan dan zegt hij: Locatie niet gevonden.

Dit kan, denk ik, enkel te maken hebben met je path = ..... in de smb.conf, die moet wel juist zijn.

Bij mij werkt samba perfect, samba is trouwens een service die nog heel veel andere mogelijkheden biedt. Mijn dank gaat dan ook uit naar de ontwikkelaars hiervan. Als men smb.conf eenvoudig opstelt, is het zelfs makkelijker dan grafische interfaces.

Maar ik werk steeds met authenticatie en ook, ik mount mijn schijven altijd via fstab.

Tenzij iemand anders de oplossing kan aangeven waarom het bij jou niet zou werken; ga ik hier zelf eens helemaal hetzelfde doen als jij, namelijk een externe hd gewoon koppelen in /media en dan als een public share laten delen. Dan kan ik jou wat beter volgen. Maar dit zal mogelijks pas voor het weekend zijn wegens tijdsgebrek.

groeten,

Offline speculoos

  • Lid
Re: USB schijf delen vanaf Ubuntu lukt niet
« Reactie #24 Gepost op: 2012/02/01, 13:36:41 »
welke bestandsindeling heeft uw externe hd?
fat? ntfs? ext3? of ander?
« Laatst bewerkt op: 2012/02/01, 16:04:03 door speculoos »