Saturday 18 May 2013

use smb (samba) mount on terminal

it was found that some of the file manager, like dolphin, is really slow in mounting on sshfs. it happens when I mount hdrive by
$ sshfs username@mango.eait.uq.edu.au:/home/users/username /home/chenming/Hdrive -o idmap=user
The best way is to find out how the file system is constructed. later on I knew that mango is not the file server, but it has the access to the file system. the real file server is smb://file.eait.uq.edu.au so we need to find out a way to mount smb server on terminal. here is the way
# mount -t cifs //file.eait.uq.edu.au/username /home/chenming/Hdrive -o username=username,password="yourpassword",domain=UQ,rw,nounix,iocharset=utf8,file_mode=0777,dir_mode=0777,gid=1000,uid=1000

the gid and uid in the behind is the same as the user you want to give read write permission.
it turns out to be much faster than I mount the system by sshfs.


SOLUTION:

First make sure that gvfs has been emerged with flag samba.
Second, make sure run the nautilus with dbus:
$ dbus-launch --exit-with-session --sh-syntax nautilus
You probably need to wait for one minutes until dbus gets ready.
Then go to connect to server, type
smb://file.eait.uq.edu.au/home/
or

smb://file.eait.uq.edu.au/software/

One should make sure after smb being typed, there is no notation like "this file server type is not recognized". If not, after entering the command, one should expect an window requiring username and password. make sure that domain is named as "UQ".

Now, one should be able to see the mounted folder from nautilus.
It is noted that one may not be able to directly access the remove folders from commandline. In fact, the location has been mounted in 
/run/user/{UID}/gvfs/
Work done!

No comments:

Post a Comment