[SOLVED] Can't access samba share from my NAS anymore

[SOLVED] Can't access samba share from my NAS anymore

Postby gemauer » Mar 17th, '13, 17:48

Hi guys

I'm really running out of ideas. It cost me three sunday afternoons already and I still have not the slightest clue what is the problem.

On my freeNAS-box (7.2) I set up (around 2009) an anonymous samba share, no user, no password. With Mageia 1 and 2 I could mount it without problems, my NMT (popcornhour) mounts it and my Win7-Box sees it, accesses it and gives me write access to it without asking for anything. When I made a fresh install with Mageia 3 beta 2 it asked for a password and keeps asking me that despite all my efforts. It has to do something with the Mageia preferences one would think, but when I try the old ones (samba.conf and fstab) it is not working either.

Here are the facts:
I tell MCC to access the samba share (which is visible) with the mount point /mnt/horst and blank user and password. It creates a fstab line like this:
//horst/freenas_share /mnt/horst cifs defaults 0 0
when I try to mount as root this happens:

Code: Select all
root@localhost ~]# mount /mnt/horst
Password for rainer@//horst/freenas_share:


Question is, why asking for a password at all and why asking for rainers password (which is the only user on the mageia-box) when I work as root?

When I just hit enter or type something:
Code: Select all
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


The old line which worked in mga2 looked like this:
//horst/freenas_share /mnt/horst cifs username=%,uid=rainer 0 0
but is not helping anymore:
Code: Select all
[root@localhost ~]# mount /mnt/horst
Password for %@//horst/freenas_share:  ********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


smbclient gives me this when I just hit enter for the password:
Code: Select all
[root@localhost ~]#  smbclient -L //horst
Enter rainer's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (horst)
        freenas_share   Disk      freenas datenpartition
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

        Server               Comment
        ---------            -------
        HORST                horst

        Workgroup            Master
        ---------            -------
        WORKGROUP            HORST


and this when I type something:
Code: Select all
[root@localhost ~]#  smbclient -L //horst
Enter rainer's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]
Server requested LANMAN password (share-level security) but 'client lanman auth = no' or 'client ntlmv2 auth = yes'
tree connect failed: NT_STATUS_ACCESS_DENIED


when I write:
client lanman auth = Yes
lanman auth = Yes
client ntlmv2 auth = no
in /etc/samba/smb.conf, then I get this in both cases (typing or leaving blank):
Code: Select all
[root@localhost ~]#  smbclient -L //horst
Enter rainer's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

        Sharename       Type      Comment
        ---------       ----      -------
        IPC$            IPC       IPC Service (horst)
        freenas_share   Disk      freenas datenpartition
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]

        Server               Comment
        ---------            -------
        HORST                horst

        Workgroup            Master
        ---------            -------
        WORKGROUP            HORST



global output of testparm looks like this:
Code: Select all
[root@localhost ~]# testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[homes]"
Processing section "[printers]"
Processing section "[print$]"
Processing section "[pdf-gen]"
Loaded services file OK.
Warning: Service printers defines a print command, but rameter is ignored when using CUPS libraries.
Server role: ROLE_STANDALONE
[global]
        server string = %h
        map to guest = Bad User
        lanman auth = Yes
        client NTLMv2 auth = No
        client lanman auth = Yes
        log file = /var/log/samba/%m.log
        max log size = 50
        printcap cache time = 60
        printcap name = cups
        dns proxy = No
        idmap config * : backend = tdb


I tried lots of fstab lines or console mount lines, nothing worked.

Mageia firewall is off.

this is the server samba.conf:
Code: Select all
$ cat /var/etc/smb.conf
[global]
encrypt passwords = yes
netbios name = horst
workgroup = WORKGROUP
server string = horst
security = share
dns proxy = no
# Settings to enhance performance:
use sendfile = yes
strict locking = no
read raw = yes
write raw = yes
oplocks = yes
max xmit = 65535
deadtime = 15
getwd cache = yes
socket options = IPTOS_LOWDELAY TCP_NODELAY SO_SNDBUF=64240 SO_RCVBUF=64240
# End of performance section
unix charset = UTF-8
store dos attributes = yes
local master = yes
time server = no
guest account = ftp
display charset = LOCALE
max log size = 10
syslog only = yes
syslog = 1
load printers = no
printing = bsd
printcap name = /dev/null
disable spoolss = yes
log level = 1
dos charset = CP437
smb passwd file = /var/etc/private/smbpasswd
private dir = /var/etc/private
passdb backend = smbpasswd
create mask = 0666
directory mask = 0777
force user = ftp
force group = ftp

[freenas_share]
comment = freenas datenpartition
path = /mnt/daten/
writeable = yes
printable = no
veto files = /.snap/
hide dot files = yes
guest ok = yes
inherit permissions = yes
hosts allow = 192.168.178.2 192.168.178.4
hosts deny = ALL


Code: Select all
$ smbstatus

Samba version 3.0.37
PID     Username      Group         Machine                       
-------------------------------------------------------------------

Service      pid     machine       Connected at
-------------------------------------------------------

No locked files



I is not the IP: 192.168.178.2 is the right one. I changed MGAGROUP to WORKGROUP in samba.conf just to be sure.

I have to miss some critical point here, perhaps someone could help me out? I'm open for suggestions.

thanks in advance
Rainer
Last edited by gemauer on Mar 24th, '13, 23:05, edited 3 times in total.
gemauer
 
Posts: 11
Joined: Jun 2nd, '12, 17:19

Re: Can't access samba share from my NAS anymore (Cauldron)

Postby madeye » Mar 18th, '13, 09:41

I've seen various problems accessing shares when option: map to guest = Bad User is used. Have you tried using map to guest = Bad Password instead? That is the NT default, but not the samba default.
(Ordinarily I would not think this matters on the client, it's a server side option, but you never know) :)
- Madeye

When I supply commands in an answer, please make sure you understand them before you run them! Use google or man to check!
User avatar
madeye
 
Posts: 110
Joined: Jul 23rd, '11, 12:36
Location: Aabenraa, Denmark

Re: Can't access samba share from my NAS anymore (Cauldron)

Postby gemauer » Mar 18th, '13, 22:28

thanks for the input, but it didn't do the trick :-(
gemauer
 
Posts: 11
Joined: Jun 2nd, '12, 17:19

Re: Can't access samba share from my NAS anymore (Cauldron)

Postby gemauer » Mar 19th, '13, 10:42

Perhaps we can do this step by step?

First question for me is:

Why am I asked for a password although I never set one? And why is neither windows nor the NMT asking?

Any ideas anyone?
gemauer
 
Posts: 11
Joined: Jun 2nd, '12, 17:19

Re: Can't access samba share from my NAS anymore (Cauldron)

Postby Ken-Bergen » Mar 19th, '13, 10:57

For what it's worth I'm using NFS syntax,
my /etc/fstab entry.
Code: Select all
192.168.1.64:/Public /mnt/Public cifs username=%,uid=ken,noauto 0 0
I too am asked for a password
Code: Select all
[root@localhost bin]# mount /mnt/Public
WARNING: using NFS syntax for mounting CIFS shares is deprecated and will be removed in cifs-utils-6.0. Please migrate to UNC syntax.       
Password for %@192.168.1.64:/Public:
Pressing Enter mounts the share.
Ken
Ken-Bergen
 
Posts: 1019
Joined: Mar 30th, '11, 02:45
Location: Chilliwack, BC, Canada

Re: Can't access samba share from my NAS anymore (Cauldron)

Postby gemauer » Mar 20th, '13, 18:41

with:
horst:/mnt/daten /mnt/horst cifs username=%,uid=rainer,noauto 0 0

I get:

Code: Select all
[root@localhost rainer]# mount /mnt/horst
WARNING: using NFS syntax for mounting CIFS shares is deprecated and will be removed in cifs-utils-6.0. Please migrate to UNC syntax.
Password for %@horst:/mnt/daten: 
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)

and when I try:
Code: Select all
[root@localhost rainer]# mount -t cifs //horst/freenas_share  /mnt/horst -o guest,sec=none
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


here without a password-question.

still confused
Last edited by isadora on Mar 21st, '13, 08:00, edited 1 time in total.
Reason: Command-output placed between [CODE]-tags to keep the forum readable. ;)
gemauer
 
Posts: 11
Joined: Jun 2nd, '12, 17:19

Re: Can't access samba share from my NAS anymore (Cauldron)

Postby gemauer » Mar 24th, '13, 20:38

OK folks .. tried a lot with limited success.

For example:
Code: Select all
[root@localhost rainer]# smbclient -UGuest //horst/freenas_share
Enter Guest's password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 3.0.37]
Server not using user level security and no password supplied.
smb: \>


here, using a blank password I could at least browse my share.

but the breakthrough was the <sec=> option:

Code: Select all
[root@localhost rainer]# mount -t cifs //horst/freenas_share  /mnt/horst --verbose -o guest,sec=none
mount.cifs kernel mount options: ip=192.168.178.10,unc=\\horst\freenas_share,sec=none,user=,pass=********
mount error(13): Permission denied
Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)


BUT:

Code: Select all
[root@localhost rainer]# mount -t cifs //horst/freenas_share  /mnt/horst --verbose -o guest,sec=ntlmv2
mount.cifs kernel mount options: ip=192.168.178.10,unc=\\horst\freenas_share,sec=ntlmv2,user=,pass=********


but no write access.
Code: Select all
[root@localhost rainer]# mount -t cifs //horst/freenas_share  /mnt/horst --verbose -o guest,uid=rainer,sec=ntlmv2
mount.cifs kernel mount options: ip=192.168.178.10,unc=\\horst\freenas_share,sec=ntlmv2,uid=500,user=,pass=********


this time with write access, what makes sense given that uid=rainer was in my fstab for years now :-)

My original fstab line was:
Code: Select all
//horst/freenas_share /mnt/horst cifs username=%,uid=rainer 0 0

which didn't work anymore.
When I change to:
Code: Select all
//horst/freenas_share /mnt/horst cifs username=%,uid=rainer,sec=ntlmv2 0 0

I can mount with a blank password:

Code: Select all
[root@localhost rainer]# mount /mnt/horst
Password for %@//horst/freenas_share: 
[root@localhost rainer]#


when I add the blank password in the fstab:
Code: Select all
//horst/freenas_share /mnt/horst cifs username=%,password=,uid=rainer,sec=ntlmv2 0 0

I can finally mount as I could before the update to Mageia3:

Code: Select all
[root@localhost rainer]# mount /mnt/horst
[root@localhost rainer]#


so problem solved, although I don't know why there was a problem in the first place. If someone cares to explain what happened here, I would be grateful!

take care guys
Rainer
Last edited by doktor5000 on Mar 24th, '13, 20:54, edited 1 time in total.
Reason: added code tags, to improve on clarity
gemauer
 
Posts: 11
Joined: Jun 2nd, '12, 17:19

Re: [SOLVED] Can't access samba share from my NAS anymore

Postby doktor5000 » Mar 24th, '13, 20:54

Please use code tags next time ;)
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 18045
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron