fachinformatiker-wiki

it's easy when it's here

User Tools

Site Tools


linux:mount

Mounten von Shares und Devices

Mounten einer Windows Share

Mounten einer Windows Share aus einer Domäne Allgemein

mount -t <dateisystem> <RemotePfadSurShare> <LokalerEinhängepunkt> -o username=<WinBenutzername>,password=<WinBenutzerPasswort>[,domain=<DomäneOhneTLD>]

Beispiel (mit IP-Adresse)

 Pfad:             //192.168.13.111/share/ 
 Einhängepunkt:    /mnt/media/ 
 Benutzername:     Administrator 
 Passwort:         passwort123 
 Domäne:           azubinet.td 
 Dateisystem(-t):  cifs 

Der Mount-Befehl sieht dann wie folgt aus:

mount -t cifs  //192.168.13.111/share/ /mnt/media/ -o username=Administrator,password=passwort123,domain=azubinet

Informationen der Shares eines Servers anzeigen

Kann auch auf Linux-Maschinen angewandt werden Allgemein

smbclient -U <Benutzername> -L <IP/DNSnameDesRemoteSystems>

Beispiel

smbclient -U Administrator -L 192.168.13.111

Beispiel Ausgabe

Domain=[AZUBINET] OS=[Windows Server 2008 R2 Standard 7601 Service Pack 1] Server=[Windows Server 2008 R2 Standard 6.1]
 
        Sharename       Type      Comment
        ---------       ----      -------
        ADMIN$          Disk      Remote Admin
        C$              Disk      Default share
        D$              Disk      Default share
        IPC$            IPC       Remote IPC
        NETLOGON        Disk      Logon server share
        share           Disk
        SYSVOL          Disk      Logon server share
session request to 10.0.0.3 failed (Called name not present)
session request to 10 failed (Called name not present)
session request to *SMBSERVER failed (Called name not present)
NetBIOS over TCP disabled -- no workgroup available

Permanenter Mount

Hinzufügen zu /etc/fstab:

# <file system>                  <mount point>   <type> <options>                                                                     <dump> <pass>
//Servername_or_IP/windows_share /home/foo/media/ cifs rw,codepage=850,iocharset=iso885915,user,uid=foo,credentials=/home/foo/smbcreds.txt 0 0

Falls obige fehlschlägt, da nicht mit allen Samba Versionen kompatibel:

//Servername_or_IP/windows_share /home/foo/media/ cifs credentials=/home/foo/smbcreds.txt 0 0

Credentials:
Die Credentials wurden in der Datei smbcreds.txt unter /home/foo/ abgelegt.
Inhalt:

username=[foo's windows-username] 
password=[foo's windows-password]

Datei vor unberechtigtem Zugriff schützen:

chown foo /home/foo/smbcreds.txt 
chmod 600 /home/foo/smbcreds.txt

http://wiki.ubuntuusers.de/fstab

Mounten einer Linux Share

Permanenter Mount

Hinzufügen zu /etc/fstab:

//servername/sharename /mountdirectory smbfs username=userename,password=password 0 0

Datenträger

<code> mount -o rw -t ext3 /dev/sdb1 /mnt/zwsp/ # als ext3 mounten mount -o rw -t ext4 /dev/sdb1 /mnt/zwsp/ # als ext4 mounten </code

This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.  More information about cookies 
linux/mount.txt · Last modified: 2024/02/17 19:03 by 127.0.0.1