LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-01-2014, 05:52 PM   #1
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Rep: Reputation: 258Reputation: 258Reputation: 258
Slackware 14.1 64-bit samba user authentication problem


I'm having a problem with samba that I can't seem to solve on Slackware 14.1. I had the same "smb.conf" working on slackware 14.0 with no problem.

I am using "security = user", so that should not be an issue.

I have one share named "root" defined to access "/" on the system. I have one user named "erik" defined with a password. I added the password using this command.

Code:
smbpasswd -a erik
Here is my "smb.conf" file.

Code:
[global]
   workgroup = ERIKWG1
   server string = Erik's Linux PC 1
   security = user
   hosts allow = 192.168.1. 192.168.175. 127.
   load printers = yes
   log file = /var/log/samba.%m
   max log size = 50
   socket options = TCP_NODELAY
   dns proxy = no
   browseable = no

[homes]
   comment = Home Directories
   browseable = no
   read only = no
   valid users = %S

[root]
   browseable = no
   read only = no
   valid users = erik
   force user = root
   path = /

[printers]
   comment = All Printers
   path = /var/spool/samba
   browseable = no
   guest ok = no
   writable = no
   printable = yes
When I try to access a share from the same computer or a different computer I always get the same error.

Code:
mount -o user=erik -t cifs //eriklnxpc1/root /mnt/hd
Password: 
mount error(13): Permission denied

mount -o user=erik -t cifs //192.168.1.11/root /mnt/hd
Password: 
mount error(13): Permission denied
I get the same error trying to access the share from KDE or a Windows computer.

After a little bit of experimenting, it appears that this is the cause of the problem.

Code:
   force user = root
If I remove that from "smb.conf" then I can access the files but with the permissions for user "erik" rather than the desired "root" user permissions.

I checked the log files on the server in "/var/log" and they are completely empty as if the client never tried to connect. For example, "/var/log/samba.eriklnxpc6" is empty.

The "/var/log/samba.smbd" file does have messages but they do not seem to relate to my problem.

Code:
[2014/03/01 12:56:31.022912,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 12:56:31.023222,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 12:59:31.203602,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 12:59:31.203828,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 14:58:08.937309,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 14:58:08.949386,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 15:10:09.530573,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 15:10:09.530873,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 15:15:06.889411,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
  Failed to delete pidfile /var/run/smbd.pid. Error was No such file or directory
[2014/03/01 15:58:41.565856,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 15:58:41.578029,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 16:10:42.100753,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 16:10:42.101002,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 16:23:42.704342,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 16:23:42.704588,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 16:36:43.408196,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 16:36:43.408394,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 16:49:44.001745,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 16:49:44.001995,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 16:57:14.487167,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
[2014/03/01 16:57:16.596275,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 16:57:16.596561,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 16:58:16.656679,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 16:58:16.656903,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:09:16.820323,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
[2014/03/01 17:09:52.366597,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:09:52.366875,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:10:52.426885,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:10:52.427125,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:22:24.292529,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:22:24.292819,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:23:24.352980,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:23:24.353175,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:28:33.262948,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
[2014/03/01 17:28:35.292343,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:28:35.292661,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:29:35.351990,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:29:35.352129,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:42:36.133359,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:42:36.133567,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 17:55:36.876221,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 17:55:36.876427,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:08:37.657684,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:08:37.657912,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:13:01.215781,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
[2014/03/01 18:13:03.244872,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:13:03.245154,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:14:03.305362,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:14:03.305582,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:14:34.455845,  0] ../lib/util/pidfile.c:153(pidfile_unlink)
  Failed to delete pidfile /var/run/smbd.pid. Error was No such file or directory
[2014/03/01 18:14:55.828252,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:14:55.828540,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:15:29.365161,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:15:29.365457,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:16:29.425472,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:16:29.425608,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
[2014/03/01 18:29:30.103085,  0] ../source3/printing/print_cups.c:151(cups_connect)
  Unable to connect to CUPS server localhost:631 - Connection refused
[2014/03/01 18:29:30.103298,  0] ../source3/printing/print_cups.c:528(cups_async_callback)
  failed to retrieve printer list: NT_STATUS_UNSUCCESSFUL
I have tried deleting the files in "/etc/samba/private" and re-adding the user "erik" with the correct password. I also can log in to "erik" at the linux console using the password defined in "shadow" that is the same as the password for samba.

Any suggestions will be appreciated. I was able to use "force user = root" on Slackware 14.0.
 
Old 03-01-2014, 06:14 PM   #2
Erik_FL
Member
 
Registered: Sep 2005
Location: Boynton Beach, FL
Distribution: Slackware
Posts: 821

Original Poster
Rep: Reputation: 258Reputation: 258Reputation: 258
Solution

I solved the problem. I'm not sure if this is a bug, but I now have to list "root" as a valid user even though there is no "root" login account for samba. Previously, the forced user did not have to be enabled as a valid samba user, and did not have to be able to access the share using samba.

Code:
   valid users = root, erik
   force user = root
I haven't thought through the possible security implications, but I assume that if I were to explicitly disallow "root" from logging into samba then no shares could use "force user = root" either.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to configure SAMBA for AD as well as Normal User authentication? chandramani_yadav Linux - Server 0 11-11-2010 02:14 AM
Slackware - LDAP + SAMBA - domain user authentication issue dilandach Slackware 1 04-07-2009 12:40 AM
samba user authentication fizeelinux Linux - Newbie 3 12-26-2008 11:54 PM
How do you test samba user authentication with smbclient? Thaidog Linux - Server 2 09-17-2008 02:48 AM
Samba - Authentication for user FAILED reeaver Linux - Software 0 09-03-2005 05:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:30 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration