Mount SMB-share as Guest with password

Asked by jones.79

Hello!

I have a question and hope you can help me.

My NAS only supports only setting a password for SMB-shares,
no username. Mounting these shares in Windows, I encounter
the normal dialog, that asks for password and username, while
the username-field is greyed (not able to chance) and set to
"Guest". Entering the password set for the folder, I can mount the
share.

Using Ubuntu and pyNeighbourhood, I was not able to find out
how to mount a share with password, but no username.
Using Options-SMB "password=xxx,guest" did not chance a thing.
Rights are set correctly, running pyNeighborhood as root does not
chance a thing.

Can you help me?
Thanks,
jones

Question information

Language:
English Edit question
Status:
Solved
For:
pyneighborhood Edit question
Assignee:
No assignee Edit question
Solved by:
jones.79
Solved:
Last query:
Last reply:
Revision history for this message
Betz Stefan (encbladexp) said :
#1

Can you connect with any other Linux SMB Tool, like smbclient?

mfg Betz Stefan

Revision history for this message
jones.79 (unrealreality) said :
#2

Hi!

Using the Debug-Mode of pyneighborhood I found that
the command

smbclient -L 192.168.0.41 -U""%""

is working from a console, too. It works well within pyN.

What does the user ""%"" stand for?

In the beginning I got the message

Server requested LANMAN password (share-level security) but 'client lanman auth' is disabled

while using smbmount in the console. Enabling "client lanman auth = yes" within
smb.conf and restarting did not change a thing.

I tried

sudo mount -t smbfs -o guest,password=ftp //192.168.0.41/FTP /home/administrator/temp/NAS/FTP/

and got the folling error

Warning: mapping 'guest' to 'guest,sec=none'
mount.cifs warning - password specified twice
mount error 5 = Input/output error

I suspect that the mapping

'guest' to 'guest,sec=none'

is causing the problems, and I have to specify that guest
does not equal "no password" somewhere. But where
can I chance that mapping?

Do you need anymore information?
As I think you are German ("mfg") - you can also
follow the discussion in the forum of www.ubuntuuers.de
http://forum.ubuntuusers.de/topic/smb-auf-nas-mit-kennwort-und-ohne-benutzernam/
I reopened an older thread from someone having
a similar problem, but until now no one answered.

Thanks for your help!

Betz Stefan wrote:
> Your question #86768 on pyneighborhood changed:
> https://answers.launchpad.net/pyneighborhood/+question/86768
>
> Status: Open => Needs information
>
> Betz Stefan requested for more information:
> Can you connect with any other Linux SMB Tool, like smbclient?
>
> mfg Betz Stefan
>

Revision history for this message
Betz Stefan (encbladexp) said :
#3

Thanks for the Link, i subscribed the Thread on Ubuntuusers. The Problem is not really pyNeighborhood specific ;-)

Greetings
Betz Stefan

Revision history for this message
Patrick Geltinger (patlkli) said :
#4

But if there's a solution at any time, we can still add this to the wishlist.

It would be a nice feature to support such a problematic NAS. ;)

However, as it's clear that this isn't a pyNH problem, I declare this answered.

Revision history for this message
jones.79 (unrealreality) said :
#5

Hi!

Here is the answer, I do not know why, but it had something to do with
the CIFS-UNIX-Extensions. The can be disabled with the option nounix.

Via console I can mount a share without username but with password with

mount -t cifs -o password=ftp,nounix //192.168.0.41/FTP /home/FTP/

I can mount shares without password with pyNeighborhood with the
option nounix set in the CIFS-options.
But I was not able to reproduce the above console command with
pyNeighborhood to mount a password-protected share with no username.

Revision history for this message
jones.79 (unrealreality) said :
#6

Ok, sorry for the confusion, this all is NOT a problem caused by
pyNH. I dont know exactly what was the problem, but now
pyNH is working as expected. The problem is the parameter nounix.

I should have read the Debug-Console correctly.
Guest-shares can be mounted with leaving the
user string empty, just entering the password.
Patrick Geltinger was right, this is not a pyNH problem.