Windows says credentials are not correct

Connection sharing, Firewall, Samba..etc
Forum rules
Before you post please read how to get help
Post Reply
drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Windows says credentials are not correct

Post by drpeppercan » Sat Sep 29, 2018 1:05 pm

Hi all!

I am following this tutorial at How to Geek: How to Share Files Between Windows and Linux

I started with Option 2 (Create a Share on Linux and Access It from Windows). I have done all the steps to install and setup Samba.
However, when I am in Windows, and enter my Linux IP address, then the Linux samba credentials, it tells me the credentials are not good.
I am entering the credentials that I initially setup in the step showing below.
sambasetup.png
sambasetup.png (21.76 KiB) Viewed 576 times
What should I do?

Thanks

altair4
Level 19
Level 19
Posts: 9284
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows says credentials are not correct

Post by altair4 » Sat Sep 29, 2018 1:34 pm

Please post the output of the following command:

Code: Select all

testparm -s
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

User avatar
administrollaattori
Level 14
Level 14
Posts: 5496
Joined: Tue Sep 03, 2013 4:51 am
Location: Finland
Contact:

Re: Windows says credentials are not correct

Post by administrollaattori » Sat Sep 29, 2018 1:46 pm

drpeppercan wrote:
Sat Sep 29, 2018 1:05 pm
What should I do?
Have you made a samba user and samba share?
viewtopic.php?f=42&t=273183&p=1495772&h ... a#p1495772

Code: Select all

sudo smbstatus --shares

User avatar
CaptainKirksChair
Level 4
Level 4
Posts: 311
Joined: Sat Feb 18, 2017 9:29 pm

Re: Windows says credentials are not correct

Post by CaptainKirksChair » Sat Sep 29, 2018 2:30 pm

Make sure you have not enabled the Mint firewall. If you do, all incoming requests will be blocked. You can enable it but then you will have to create a rule to allow a specific request. I have never done that so I can't offer any help. I just know that the firewall will block your network activity.

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Tue Oct 02, 2018 9:09 am

altair4:

Sorry I took so long...

Code: Select all

testparm -s
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
Processing section "[printers]"
Processing section "[print$]"
Processing section "[javier]"
WARNING: No path in service javier - making it unavailable!
NOTE: Service javier is flagged unavailable.
Loaded services file OK.
WARNING: The 'netbios name' is too long (max. 15 chars).

Server role: ROLE_STANDALONE

# Global parameters
[global]
	server string = %h server (Samba, Ubuntu)
	server role = standalone server
	map to guest = Bad User
	obey pam restrictions = Yes
	pam password change = Yes
	passwd program = /usr/bin/passwd %u
	passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
	unix password sync = Yes
	syslog = 0
	log file = /var/log/samba/log.%m
	max log size = 1000
	dns proxy = No
	usershare allow guests = Yes
	panic action = /usr/share/samba/panic-action %d
	idmap config * : backend = tdb


[printers]
	comment = All Printers
	path = /var/spool/samba
	create mask = 0700
	printable = Yes
	browseable = No


[print$]
	comment = Printer Drivers
	path = /var/lib/samba/printers


[javier]
	available = No

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Tue Oct 02, 2018 9:11 am

administrollaattori wrote:
Sat Sep 29, 2018 1:46 pm
Have you made a samba user and samba share?
viewtopic.php?f=42&t=273183&p=1495772&h ... a#p1495772

Code: Select all

sudo smbstatus --shares
Sorry I took so long administrollaattori

Code: Select all

sudo smbstatus --shares
[sudo] password for javier: 

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

altair4
Level 19
Level 19
Posts: 9284
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows says credentials are not correct

Post by altair4 » Tue Oct 02, 2018 9:25 am

The only share you have defined in smb.conf is this one:
[javier]
available = No
It has no path and it's set as unavailable.

You also have a problem with your host name ( netbios name ) in that it's too long so you will have to either fix that in smb.conf or access this server by ip address.

The HowTo had you create a share that looks like this:
[<folder_name>]
path = /home/<user_name>/<folder_name>
available = yes
valid users = <user_name>
read only = no
browsable = yes
public = yes
writable = yes
Somewhat convoluted but it will work.

Make sure you add <user_name> to the samba password database:
sudo smbpasswd -a <user_name>

If you want to fix this error: WARNING: The 'netbios name' is too long (max. 15 chars).
Edit smb.conf and right below the workgroup = WORKGROUP line add this one:

Code: Select all

netbios name = mintsmb
THen restart samba in this order:

Code: Select all

sudo service smbd restart

Code: Select all

sudo service nmbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Tue Oct 02, 2018 10:56 am

Update:

Never mind!
I corrected the typo. It's all good.

Now I'll check from Windows.

Thanks a lot altair4 :)

-------------------------------------------------------

Code: Select all

sudo service nmdd restart
Failed to restart nmdd.service: Unit nmdd.service not found.
Anything to do about that?

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Tue Oct 02, 2018 11:13 am

I checked with the same commands again, and my share still showing as unavailable, even though it shows "available = yes" in the smb.conf.
This is what I have exactly in the smb.conf file:

Code: Select all

[javier] path = /home/javier/javier available = yes valid users = javier read only = no browsable = yes public = yes writable = yes
Also "sudo smbstatus --shares" still showing nothing:

Code: Select all

sudo smbstatus --shares
Should I reboot the computer?

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Tue Oct 02, 2018 11:21 am

Nothing changed after rebooting :(

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Tue Oct 02, 2018 5:32 pm

mintsmb.JPG
It does show this. But nothing else.

altair4
Level 19
Level 19
Posts: 9284
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows says credentials are not correct

Post by altair4 » Wed Oct 03, 2018 6:53 am

Please see my post below before doing this. I may have found the source of your problem.

Post the entire contents of your smb.conf file:

Code: Select all

cat /etc/samba/smb.conf
EDIT: And just in case run the following command and post its contents - if there is any:

Code: Select all

net usershare info --long
Last edited by altair4 on Wed Oct 03, 2018 7:35 am, edited 1 time in total.
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

altair4
Level 19
Level 19
Posts: 9284
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows says credentials are not correct

Post by altair4 » Wed Oct 03, 2018 7:15 am

drpeppercan wrote:
Tue Oct 02, 2018 11:13 am

Code: Select all

[javier] path = /home/javier/javier available = yes valid users = javier read only = no browsable = yes public = yes writable = yes
To be honest I wasn't sure that would work or not since I've never seen a share definition on one line like that. So I added it to my own smb.conf and it doesn't work that way. Edit smb.conf. remove the line, and add the share definition back this way:

Code: Select all

[javier] 
path = /home/javier/javier 
available = yes 
valid users = javier 
read only = no 
browsable = yes 
public = yes 
writable = yes
Then restart smbd:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Mon Oct 08, 2018 1:55 pm

It's getting better, one little step at a time...
cantfindjavier_02.JPG

But when I try to open my javier folder:
cantfindjavier.JPG
cantfindjavier_03.JPG

altair4
Level 19
Level 19
Posts: 9284
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows says credentials are not correct

Post by altair4 » Mon Oct 08, 2018 2:30 pm

Does the /home/javier/javier folder exist?

Code: Select all

ls -dl */
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Mon Oct 08, 2018 3:55 pm

Code: Select all

ls -dl */
drwxr-xr-x 2 root   root   4096 Jan  1  2018 2018-01-01-15-img/
drwxrwxr-x 4 javier javier 4096 Oct  8 12:20 Apps/
drwxr-xr-x 2 javier javier 4096 Oct  4 19:38 Desktop/
drwxrwxr-x 5 javier javier 4096 Oct  8 12:57 Documents/
drwxr-xr-x 4 javier javier 4096 Oct  8 12:09 Downloads/
drwx------ 2 javier javier 4096 Feb 22  2018 efax-gtk-server/
drwx------ 2 javier javier 4096 Feb 22  2018 faxin/
drwx------ 2 javier javier 4096 Feb 22  2018 faxout/
drwx------ 2 javier javier 4096 Feb 22  2018 faxsent/
drwxr-xr-x 2 javier javier 4096 Dec 21  2017 Music/
drwxr-xr-x 5 javier javier 4096 Oct  4 19:13 Pictures/
drwxr-xr-x 2 javier javier 4096 Dec 21  2017 Public/
drwxrwxr-x 9 javier javier 4096 Sep 24 17:17 rtl8812AU_8821AU_linux/
drwxr-xr-x 2 javier javier 4096 Dec 21  2017 Templates/
drwxr-xr-x 2 javier javier 4096 Oct  4 12:44 Videos/

altair4
Level 19
Level 19
Posts: 9284
Joined: Tue Feb 03, 2009 10:27 am

Re: Windows says credentials are not correct

Post by altair4 » Mon Oct 08, 2018 5:04 pm

Your share definition is this:
[javier]
path = /home/javier/javier
available = yes
valid users = javier
read only = no
browsable = yes
public = yes
writable = yes
You have no /home/javier/javier folder which is why Windows can't find it. So open a terminal and create the folder:

Code: Select all

mkdir /home/javier/javier
Note: If your original intent was to create a samba share of your home folder your share definition should look like this:
[javier]
path = /home/javier
available = yes
valid users = javier
read only = no
browsable = yes
public = yes
writable = yes
If you change it in smb.conf remember to restart smbd:

Code: Select all

sudo service smbd restart
Please add a [SOLVED] at the end of your original subject header if your question has been answered and solved.

drpeppercan
Level 2
Level 2
Posts: 61
Joined: Fri Dec 15, 2017 8:10 pm

Re: Windows says credentials are not correct

Post by drpeppercan » Mon Oct 08, 2018 8:23 pm

YYYYEEEESSSSS!!!!!!!!!!!
Success finally!

Thank you ever so much for your help and patience altair4!!! :)

DPC

Post Reply

Return to “Other networking topics”