Technical: Linux – CentOS – Connected Servers Shares not showing up in some “File open” Dialogs

Technical: Linux – CentOS – Connected Servers Shares not showing up in some “File open” Dialogs

Background

In Google Chrome and Firefox, I am a trying to upload some images from a network computer, but those shares are not showing up.

 

Connect to Server

Imagine for a few minutes, you are on your Linux box and you need to connect to your WIndows box and upload some files \ images.

Im my case, my Linux box is a CentOS and so from my desktop, I access the Desktop Menu bar and click on the menu items Places and “Connect To Server …”.

 

ConnectToServer

 

Windows Shares Not Visible

Unfortunately, based on my Application, I have a slightly different Open Dialog:

 

gEdit

gEdit

 

 

Chrome

Chrome

 

 

 

Firefox

 

Firefox

 

The major differences for me is that  in gEdit, I am able to locate my network shares… That slot is “/danieladeniji/<server-name>” and in our example it is only visible (as the last entry on the left panel) in gEdit.

 

Using Samba, Mount Windows Resources\Shares

Install Utilities

Install Utilities – samba-client


sudo yum install samba-client

We are good… as we got back

Package samba-client-3.6.9-168.el6_5.i686 already installed and latest version

 

Install Utilities – samba-common


sudo yum install samba-common

We are good… as we got back

Package samba-common-3.6.9-168.el6_5.i686 already installed and latest version
Nothing to do

 

Install Utilities – cifs-utils

sudo yum install cifs-utils

 

We are good… as we got back

 Package cifs-utils-4.8.1-19.el6.i686 already installed and latest version

Using Samba, Mount Windows Resources\Shares

 

Create Mnt Folder

sudo mkdir /mnt/demobox__DanielAdeniji

Mount Mnt Folder

sudo mount --verbose -t cifs //demobox/DanielAdeniji /mnt/demobox__DanielAdeniji -o username=dadeniji,domain=labdomain,password=candi,sec=ntlm

 

By the way had a lot of problems with this step.  Pasted below are some of incorrect entries we entered and the corresponding errors.

 

Aliased Hostname 

When I tried issuing against an alias name


sudo mount --verbose -t cifs //aliasName/DanielAdeniji /mnt/demobox__DanielAdeniji -o username=dadeniji,domain=labdomain,password=candi,sec=ntlm

 

When we tried obfuscating our hostname by adding an alias name to our hosts files, and targeting that aliasname, here is the error message we get

mount error(5): Input/output error

 

Crediting Pastorino
http://www.linuxquestions.org/questions/linux-networking-3/cifs-mount-error-5-%3D-input-output-error-but-smbfs-works-456897/

 

 

Incorrect Password

If the password is incorrect


sudo mount --verbose -t cifs //demobox/DanielAdeniji /mnt/demobox__DanielAdeniji -o username=dadeniji,domain=labdomain,password=candi,sec=ntlm

wrong password

mount error(13): Permission denied

 

 

If Password contains special characters

If the password contains special characters such as !


sudo mount --verbose -t cifs //demobox/DanielAdeniji /mnt/demobox__DanielAdeniji -o username=dadeniji,domain=labdomain,password=candi!,sec=ntlm

you will get an error message, such as “event not found

bash: !,sec=ntlm: event not found

to correct quote your password

sudo mount --verbose -t cifs //demobox/DanielAdeniji /mnt/demobox__DanielAdeniji -o username=dadeniji,domain=labdomain,password='candi!',sec=ntlm

see we replace candi, with ‘candi!’

 

List Mount Points

Using the mount command, we will list our mount points

Syntax:


mount -v

 

Sample:


mount -v | grep -i "Daniel"

 

Output:

ListMountPointsThatHaveDanielInTheirName

 

 

List Mount Point Contents

Using the mount command, we will list our mount points

Syntax:


ls /mnt/<folder>

 

Sample:


ls /mnt/demobox__DanielAdeniji | more

 

Mounted Folders

So though we still can not view connected servers, we can access our Windows Shares through the mnt folders (/mnt)

 

OpenFile--MountPoints

 

 

Windows Computer Names and Aliases

Btw, to use aliases for MS Windows host names, place them in your /etc/samba/lmhosts file.

etc--samba--lmhosts

 

This is one way you can avoid the “mount error(5): Input/output error” we spoke about earlier.

Keep in mind that trying to use the /etc/hosts will not do.

Dedication

I am going to dedicate this post to Bart and Jorge Castro.  They firmly, yet economically stated this question in a Q/A post titled “gvfs – How do applications open from/save to smb shares? – Ask Ubuntu” ( http://askubuntu.com/questions/224441/how-do-applications-open-from-save-to-smb-shares ).

For me, a newbie, clear and concise concerns helps declutter my space and rather than waste time trying to see if my environment is not properly setup, I can spend cycle trying to bridge seeming implementation gaps.

 

References

References – Mounting Windows Share – Blog

 

References – Mounting Windows Share – Q/A

 

References – Off Topic

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s