LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba Problem (https://www.linuxquestions.org/questions/linux-newbie-8/samba-problem-4175446737/)

halimulalam 01-22-2013 07:35 AM

Samba Problem
 
Hello Dear
I am getting an error while connecting to a password protected shared folder. When I clicked on the folder, it asks me the user name and password. But after giving password it shows the below error:
create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD

but if I use windows command prompt to connect to that folder, that works without any problem. below is my smb.conf file. I added the halim user by addusr halim then smbpasswd -a halim.

Please someone help me.

I am getting error for the subcon share.

#======================= Global Settings =====================================
[global]
workgroup = WORKGROUP
#security = share
map to guest = bad user
security = share
encrypt passwords = yes
#smb passwd file= /usr/bin/smbpasswd
#============================ Share Definitions ==============================
[CommonShare]
path = /home/share
browsable =yes
writable = yes
guest ok = yes
read only = no

#subcon folder
[subcon]
path=/home/subcon
brwosable=yes
writeable=yes
guest ok=no
valid users=halim

shivaa 01-22-2013 08:18 AM

Shared folder between which two hosts?
You have to use samba password, if you're accessing it from Windows.
Also you can see entry for smbpasswd file is commented in smb.conf:
Code:

#smb passwd file= /usr/bin/smbpasswd
So once remove comment and try again.

TroN-0074 01-22-2013 10:35 AM

This is what I have been using at home, and is working fine for me type in terminal as root
Code:

mount -t cifs -o username=<samba_username>,password='<samba_password>' //IP_server/shared_folder /mountpoint_on_client

Good luck to you

halimulalam 01-22-2013 10:53 AM

Quote:

Originally Posted by shivaa (Post 4875416)
Shared folder between which two hosts?
You have to use samba password, if you're accessing it from Windows.
Also you can see entry for smbpasswd file is commented in smb.conf:
Code:

#smb passwd file= /usr/bin/smbpasswd
So once remove comment and try again.

Dear Shivaa
Thanks for your reply.
My samba was on centos 6.3 and my clients are windows7.
I got the smbpassword in /usr/bin/smbpasswd and gave the location in my smb.conf file.
Since I got no result, i commented it.
Below list was my trying:
1) useradd halim
2) passwd halim
3) smbpasswd -a halim
4) \\192.168.1.3
5) double click on "subcon"
6) user: halim password: !@#QWE (smbpasswd)
7) error
8) in windows command prompt net use \\192.168.1.3\subcon
9) user and password...it works

Please let me know what I have to do to get access on that folder by double clicking on it. I don't want to do it from command prompt.

suicidaleggroll 01-22-2013 11:00 AM

What is this "subcon" thing you're clicking on? Why not just map the SAMBA share to a drive letter on the Windows clients, so they can open it up like any other drive?

halimulalam 01-22-2013 11:16 AM

Dear suicidaleggroll
I made the subcon directory in my home directory (/home/subcon) and shared it as subcon.
I can connect to that folder if I use windows command prompt. But I cant connect to it either by windows explorer or by mapping it as map drive.
When I try to make a map drive, it asks for user id and password. after giving the id and password it shows password/id not correct.
At that time if I see the samba log it shows:

create_connection_server_info failed: NT_STATUS_WRONG_PASSWORD

suicidaleggroll 01-22-2013 11:30 AM

Is that typo in your smb.conf in the OP actually there, or was that just a mistake when copying it into your post? The typo I'm referring to is "brwosable" in [subcon]. I'm not sure if that could cause this or not.

shivaa 01-22-2013 11:45 AM

Is 'subcon' somewhere inside /home/halim/.../subcon?
Anyway, after invoking following steps:-
Quote:

1) useradd halim
2) passwd halim
3) smbpasswd -a halim
4) \\192.168.1.3
5) double click on "subcon"
Can you once enter Unix password of halim user, when it asks to enter password, instead of smbpassword? Make a try.

halimulalam 01-22-2013 12:01 PM

Quote:

Originally Posted by suicidaleggroll (Post 4875547)
Is that typo in your smb.conf in the OP actually there, or was that just a mistake when copying it into your post? The typo I'm referring to is "brwosable" in [subcon]. I'm not sure if that could cause this or not.

Dear suicidaleggroll
It was my typing mistake, now I changed it. But no result.
My windows is showing "The specified network password is not correct" and samba showing that error as before.

halimulalam 01-22-2013 12:05 PM

Dear Shiva
The subcon folder is in /home directory not in /home/halim.
I followed your direction but no result. My windows again showing "The specified network password is not correct"
Below is the list of home directory:
drwxr-xr-x. 7 root root 4096 Jan 22 13:31 .
dr-xr-xr-x. 25 root root 4096 Jan 22 18:50 ..
drwx------. 4 halim halim 4096 Jan 22 12:46 halim
drwxrwxr-x. 2 halim root 4096 Jan 22 13:31 it
drwx------. 2 root root 16384 Jan 21 15:21 lost+found
drwxrwxrwx. 2 root root 4096 Jan 22 18:03 share
drwxrwx---. 2 halim subcon 4096 Jan 22 12:49 subcon

One thing making me more confused, why the error coming only in windows explorer not in windows cmd.
Windows cmd accepting the password.

Please help me.

shivaa 01-22-2013 12:18 PM

Wait! Did you notice that, you're logged in as halim and you're trying to access subcon directory i.e. /home/subcon with use of halim's smbpassword !! Then how it can allow you?

In samba, a Windows username and Unix username are mapped in smbusers file in Unix, like:
Code:

windows_username == unix_username
Can you once try to open it using subcon's smbpassword/Unix password (I assume subcon is also some user and /home/subcon is his home dir.).

halimulalam 01-22-2013 12:28 PM

Dear Shiva
thanks again for your prompt reply.
subcon is not an user, I just made the subcon folder in home.
my user password of halim and smbpasswd of halim are same.


All times are GMT -5. The time now is 07:36 AM.