Gentoo, Mounting a remote Shared Folder

http://en.gentoo-wiki.com/wiki/Mounting_a_remote_Shared_Folder

 

In order to mount a remote filesystem, you must configure your kernel accordingly.

 

 

cd /usr/src/linux
make menuconfig

 

Linux Kernel Configuration: CIFS File system support
File Systems  --->
     [*] Network File Systems  --->
          <*>   CIFS support (advanced network filesystem, SMBFS successor)
          [*]     CIFS Statistics
          [*]     CIFS Extended attributes

 

 

make clean && make bzImage && make modules && make modules_install && make install

cp arch/x86_64/boot/bzImage /boot/kernel-2.6.32-gentoo-r7

reboot 

更详细参考:http://jiajun.iteye.com/blog/538820

 

After that, you have to emerge the package mount-cifs.

emerge mount-cifs


Refer to the official kernel configuration article to compile and install your fresh kernel.

Usage

Use the following terminal command to mount a remote folder, replacing IP_OR_NAME with the IP or the computer name, SharedFolderName with the the Shared folder name and /mnt/sharedfolder with the local folder you want to link with.

[edit ] CIFS (Windows)

Make a target directory:

mkdir /mnt/sharedfolder

Mount the remote share:

mount -t cifs //IP_OR_NAME/SharedFolderName /mnt/sharedfolder

If you need credentials to access the remote folder, use the following :

mount -t cifs //IP_OR_NAME/SharedFolderName /mnt/sharedfolder -o "username=X,passwd=Y"

You can also specify if the share is read/write (rw), read only (ro) or write only (wo) with the -o parameter. Here is a complete working example :

mount -t cifs //192.168.1.101/SharedDocs /mnt/sharedfolder -o "rw,username=admin,passwd=password"

你可能感兴趣的:(linux,windows,Blog,Access)