LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   problem with samba , can't access shares in win7 nor ubuntu (https://www.linuxquestions.org/questions/linux-newbie-8/problem-with-samba-cant-access-shares-in-win7-nor-ubuntu-4175467061/)

ali.abry 06-23-2013 05:04 AM

problem with samba , can't access shares in win7 nor ubuntu
 
Hi every body

i just setup samba4 in ubuntu 12.04 but in windows7 it dose not accept password or username when i want to access my share.
in ubuntu when i try to access my share , it shows shared files , but it give this error :
Code:

Failed to mount Windows share
here is my share section :
Code:

[test]
        comment = Ubuntu File Server
        path = /var/smb-share
        browsable = yes
        guest ok = no
        read only = no
        writable = yes
        available = yes
        public = no
        create mask = 0755
        valid users = lili

i already added users to samba by smbpasswd .


out put of testparm :
Code:

# testparm
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Processing section "[test]"
Processing section "[printers]"
Processing section "[print$]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

[global]
        workgroup = PC
        server string = %h server (Samba, Ubuntu)
        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

[test]
        comment = Ubuntu File Server
        path = /var/smb-share
        valid users = lili, alieblice
        read only = No
        create mask = 0755

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

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


Ser Olmy 06-23-2013 06:27 AM

Which version of Samba are you using?

You say you can see the shared files from Ubuntu, but still get an error message? How do you get to see the files, and under what circumstances does the error message appear?

What (if anything) appears in the smbd log when you attempt to connect/authenticate? Any messages from PAM in the security log?

ali.abry 06-23-2013 06:51 AM

thanks for reply

i use samba 4.0.0alpha18

i go to nautilus then :
Files tab > Connect to server > windows share
it shows me the share files and when i click on them it gives the error (Failed to mount Windows share)

theres nothing in log files about authentication failure. here is my entire log file :

Code:

# cat /var/log/samba/log.%m
[2013/06/23 04:14:50,  0] ../source4/smbd/server.c:366(binary_smbd_main)
  samba version 4.0.0alpha18 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2012
[2013/06/23 04:14:50,  0] ../source4/smbd/server.c:461(binary_smbd_main)
  samba: using 'standard' process model
[2013/06/23 04:14:50,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [ldap_server: no LDAP server required in standalone configuration]
[2013/06/23 04:14:50,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [cldap_server: no CLDAP server required in standalone configuration]
[2013/06/23 04:14:50,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [kdc: no KDC required in standalone configuration]
[2013/06/23 04:14:50,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [dreplsrv: no DSDB replication required in standalone configuration]
[2013/06/23 04:14:50,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [Cannot start Winbind (standalone configuration): Failed to find record for ALI in /var/lib/samba/private/secrets.ldb: No such object: (null): Have you provisioned this server (ALI) or changed it's name?]
[2013/06/23 04:14:50,  0] ../source4/smbd/service_task.c:35(task_server_terminate)
  task_server_terminate: [kccsrv: no KCC required in standalone configuration]


Ser Olmy 06-23-2013 07:21 AM

Quote:

Originally Posted by ali.abry (Post 4977011)
i use samba 4.0.0alpha18

That is a) really old, and b) alpha-quality software. The current version is 4.0.6 (or 3.6.16 for the non-AD 3.x branch).

You should consider upgrading to the latest 4.x release, or perhaps use the 3.x version instead. If you're not going to use the AD DC functionality, 3.x might be a better choice right now.

Quote:

Originally Posted by ali.abry (Post 4977011)
i go to nautilus then :
Files tab > Connect to server > windows share
it shows me the share files and when i click on them it gives the error (Failed to mount Windows share)

You mean it shows you the share, but fails to connect, right? You can't actually see the files because of the authentication error?

Quote:

Originally Posted by ali.abry (Post 4977011)
theres nothing in log files about authentication failure. here is my entire log file :

Do you have a log file called /var/log/samba/log.smbd or possibly /var/log/samba/log.smbd.something (where something will be a host name of some kind)?

For PAM-related security messages, check /var/log/secure.

ali.abry 06-23-2013 07:50 AM

i will install 3.x version since i just going to do simple file sharing.
i have only one log file :
Code:

# ls /var/log/samba/
log.%m

i don't have /var/log/secure .

it's some kind of odd that i have alpha version of samba since im using ubuntu LTS version i think i should have newer version .

Ser Olmy 06-23-2013 08:15 AM

Quote:

Originally Posted by ali.abry (Post 4977035)
i don't have /var/log/secure .

My mistake. It seems Ubuntu logs authentication-related information in /var/log/auth.log.

ali.abry 06-23-2013 12:39 PM

problem solved

thanks to "Ser Olmy" i guided to the right version of samba so i changed samba4 to samba 3 on debian this time not ubuntu and it works fine .

it seems that ubuntu is not going to release samba4 stable version for ubuntu 12.04 and latest samba4 version on debian is 4.0.0beta2 more information about this can be found in here :
http://ubuntuforums.org/showthread.php?t=2094243


All times are GMT -5. The time now is 02:53 AM.