Jump to content

Telnet Mount Befehl um ein CIFS Verzeichnis


Worschter

Empfohlene Beiträge

Hallo,

 

kann mir vielleicht jemand auf die Sprünge helfen?

Such mir grad nen Wolf.

 

um ein NFS Verzeichnis zu mounten lautet der Befehl zum Beispiel

 

mount -o rw,soft,udp,nolock,rsize=8192,wsize=8192 192.168.1.1:NFSDIR /mnt/test -t nfs

 

kennt jemand den etsprechenden Befehl für ein CIFS Mount?

 

ich hab bisher sowas in der Art gefunden:

 

mount -t smbfs -o username=NAME,password=PASS,codepage=cp850,iocharset=utf8 //192.168.179.30 test /mnt

 

 

klapp aber net -_-

 

Gruß!

Link zu diesem Kommentar
Auf anderen Seiten teilen

  • Admin

@Worschter

 

Wenn ich die C-Quellen von Neutrino richtig interpretiere, müßte der Aufruf so aussehen:

mount -t cifs //192.168.0.1/freigabe /mnt/local -o username=username,password=passwort,unc=//192.168.0.1/freigabe,ro

 

Die roten Einträge natürlich anpassen. Ob statt ro auch rw geht, muß man testen.

 

EDIT: rw geht auch.

Link zu diesem Kommentar
Auf anderen Seiten teilen

  • Admin

@Worschter

Also wenn nun noch jemand den Mountbefehl für ftpfs hätte  -_-

 

dann könnt ich den woltimer für die neue Geschichte auch rüsten.

 

Gruß!

 

Also laut Neutrino-Quellen so:

lufs none /mnt/local -o fs=ftpfs,username=username,password=passwort,host=192.168.0.1,root=/freigabe

 

Es gibt aber noch nen Haufen weiterer Optionen, dazu mal ein Auszug von sourceforge.net

4.1 MOUNTING:

 

 

 

 

NOTE: Regular users can mount/unmount lufs file systems using lufsmount/lufsumount if suid is set on these mount wrappers (see INSTALLATION).

 

 

 

 

For your convenience, a mounting utility is provided (lufsmount) which allows a more natural interface.

 

 

 

 

Lufsmount ://[[:]@][][:][/] [OPTIONS]

 

 

 

 

The -h flag provides a complete description of the available options.

 

 

 

 

Notes:

 

“/”, ”:”, “@” are treated as separators by lufsmount. If one of the parameters contains such characters, you shouldn't use lufsmount.

 

lufsmount is just a parameter parser actually, which in turn calls lufsd with formated parameters, so you could use lufsd if you run into lufsmount's limitations.

 

 

 

 

Another way to mount a LUFS is by calling lufsd directly:

 

 

 

 

lufsd none mountpoint -o options[...]

 

 

 

 

where the options have exactly the same syntax as when using mount (see below).

 

 

 

 

Besides lufsmount & lufsd, you can always count on good ol' mount. You'll probably not be able to use mount as a regular user though... The general syntax for mounting a LUFS file system is

 

 

 

 

mount -t lufs none mountpoint -o nosuid,fs=file_system[,uid=id][,gid=id][,fmask=mode][,dmask=mode][,channels=nr_c

han][,root=remote_root][,own_fs][,quiet][,...]

 

 

 

 

fs=file_system : the file system type to mount (localfs, sshfs, ftpfs)

 

uid=id : the uid to own the mounted fs

 

gid=id : the gid to own the mounted fs

 

fmask=mode : the minimal permissions to be set on each file

 

dmask=mode : the minimal permissions to be set on each directory

 

channels=nr_chan : the number of communication channels to open for a mounted fs

 

root=remote_root : the remote directory to be mapped on the file system's root

 

own_fs : the whole file system will be owned by the mounting user

 

quiet : disable all logging (close all file descriptors)

 

dir_cache_ttl=secs : number of seconds a directory cache entry is valid

 

 

 

 

The nosuid option is automatically appended, so that all the remote file systems are treated as untrusted.

 

 

 

 

Sensitive information (passwords) will not be written in /etc/mtab.

 

 

 

 

The number of communication channels represents the number of independent channels that will be used for a mounted file system. More of these insure better performance when multiple processes access the file system. Ideally, one channel per accessing process would allow optimum performance. There is a channel setup and resource overhead though, so a number of ~7 channels should not be exceeded. In some cases, multiple channels may cause problems (ftp servers only allowing a limited number of logins from a certain IP), so the channels option allows you to specify a reduced number (possibly 1).

 

 

 

 

For file system specific options and examples check out the FILE SYSTEMS section.

 

 

 

 

 

 

 

 

 

 

4.2 UNMOUNTING:

 

 

 

 

As root, you can simply use umount in order to unmount a lufs file system. That is:

 

 

 

 

#umount /mnt/lufs

 

 

 

 

A regular user will have to use the suid-ed lufsumount:

 

 

 

 

$lufsumount ~/mnt/lufs

 

 

 

 

Of course, a regular user will only be able to unmount file systems mounted by himself.

 

 

 

 

 

 

 

4.3 AUTOFS SUPPORT:

 

 

 

 

LUFS provides autofs executable maps for ftpfs and sshfs (auto.ftpfs and auto.sshfs). These can be used in /etc/auto.master as follows:

 

 

 

 

# Sample auto.master file

 

# Format of this file:

 

# mountpoint map options

 

# For details of the format look at autofs(8).

 

/mnt/net/ssh /etc/auto.sshfs --timeout=60

 

/mnt/net/ftp /etc/auto.ftpfs --timeout=60

 

 

 

 

 

 

 

Then, after restarting automount (/etc/init.d/autofs restart), you can access ssh and ftp servers more easily:

 

 

 

 

$ cd /mnt/net/ftp/ftp.kernel.org/pub

 

$ ls -al /mnt/net/ssh/mali@lufs.sourceforge.net

 

 

 

 

 

 

 

Mounting and unmounting is taken care of by autofs.

 

 

 

 

Notes:

 

the --enable-autofs-install configure parameter will configure autofs for /mnt/net/ssh and /mnt/net/ftp automatically.

 

for sshfs to function properly under autofs, public key authentication must be configured for root (or whoever is running automount - see the SSHFS section).

 

 

 

 

 

 

 

4.4 PERMISSIONS MAPPING

 

 

Two methods are available for mapping remote permissions locally:

 

 

 

 

normal mapping: the file/dir permissions are preserved and the owner changed accordingly (either the mounting user, or some neutral – uid=gid=2 – if the file is not owned remotely). This mode is active by default.

 

forced ownership: all the files/dirs are owned by the mounting user and the permissions are changed to reflect real access rights (if the file is not owned remotely, then the local “user” and “group” permissions will be the same as remote “other”). This mode is activated by the own_fs option

Link zu diesem Kommentar
Auf anderen Seiten teilen

  • 3 weeks later...
  • 3 weeks later...

hallo,

nun das mit cfis klappt ja ganz gut, aber wie sieht es mit nfs aus ??

ich versuche alles aber entweder bekomme ich die Fehlermeldung

Invalid Argument´s oder device oder File not found.

Link zu diesem Kommentar
Auf anderen Seiten teilen

Hallo,

 

also vorab ist zu sagen, daß um ein NFS LAufwerk zu mounten benötigt es dreier Treiber

die geladen sein müssen:

 

lockd

sunrpc

nfs

 

kannst Du mit lsmod kontrollieren, die müssten ziemlich zu anfang auftauchen, wenn nicht

insmod lockd

insmod sunrpc

insmod nfs

 

dann lautet die Zeile zum mounten:

 

mount -o rw,soft,udp,nolock,rsize=8192,wsize=8192 192.168.1.100:Aufnahme /mnt/record -t nfs

 

natürlich mit der IP Deines Rechners. Aufnahme ist die NFS-Freigabe auf dem Rechner und

/mnt/record der Mountpoint auf der Box.

 

Gruß!

Link zu diesem Kommentar
Auf anderen Seiten teilen

  • Wer ist Online   0 Benutzer

    • Keine registrierten Benutzer online.
×
×
  • Neu erstellen...