LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-01-2014, 09:22 AM   #1
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248
Blog Entries: 3

Rep: Reputation: 17
Lightbulb Samba Error


Hi All,

I am testing samba in which any user connecting from any machine i need the audit log also if someone is deleted then it should be save some where else the deleted part should be completed by the admin so when i am testing below are the error pop's up



[root@Kickstart Server]# smbclient -L localhost
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
[root@Kickstart Server]#


[root@Kickstart Server]# getenforce
Disabled
[root@Kickstart Server]#

[root@Kickstart Server]# service iptables status
Firewall is stopped.

[root@Kickstart Server]# smbpasswd -a dk
New SMB password:
Retype new SMB password:
Failed to modify password entry for user dk
[root@Kickstart Server]# smbclient -L localhost -U dk
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
[root@Kickstart Server]#

############################################
Configuration which i am using is

mkdir-p /share/smbshare/share/recycle

chmod 1777 /share/smbshare

chmod 777 /share/recycle

smb.conf

[Global]
log level = 0 vfs:0
log file = /var/log/samba/%m.%U.log
max log size = 0
[Share]
path = /share/smbshare
comment = Shared Folder
create mask = 0770
valid users = dk test
directory mask = 0775
public = yes
writeable = yes
vfs objects = extd_audit recycle
full_audit:failure = none
full_audit:success = mkdir rename unlink rmdir open pwrite
full_auditrefix = %u|%I|%m|%S
recycle:keeptree = yes
recycle:repository = /recycle/%U
recycle:exclude = tmp|temp
recycle:versions = yes
[Recycle]
path = /share/recycle/%U
comment = Recycle the Bin
browseable = no
writable = yes


[root@Kickstart Server]# testparm /etc/samba/smb.conf
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[Share]"
Processing section "[Recycle]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions

Last edited by pantdk; 02-01-2014 at 09:24 AM.
 
Old 02-02-2014, 01:26 AM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 3,334

Rep: Reputation: Disabled
Which version of Samba are you running?

Have you tried increasing the log level (you currently have it set to 0) and checking the logs?

Have you tried using the (full) name of the server instead of "localhost"?
Code:
smbclient -L <server_name>
Using an alias like "localhost" or the IP address of the server, makes it impossible to use certain authentication schemes. The server must then fall back to earlier protocols that may need to be specifically enabled in smb.conf in order to work.
 
Old 02-02-2014, 09:36 PM   #3
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
Ser_olmy
Log are created below are the logs location & also i try the IP & hostname

samba-3.0.33-3.28.el5

[root@Kickstart samba]# ll
total 44
-rw-r--r-- 1 root root 0 Feb 1 13:07 127.0.0.1..log
-rw-r--r-- 1 root root 0 Feb 2 02:48 172.16.11.149..log
-rw-r--r-- 1 root root 0 Feb 1 13:02 172.16.11.151..log
drwx------ 4 root root 4096 Feb 1 12:59 cores
-rw-r--r-- 1 root root 0 Feb 1 13:09 kickstart.anil.log
-rw-r--r-- 1 root root 0 Feb 2 02:12 kickstart.dk.log
-rw-r--r-- 1 root root 0 Feb 1 13:07 kickstart.root.log
-rw-r--r-- 1 root root 1166 Feb 2 11:56 nmbd.log
-rw-r--r-- 1 root root 80 Feb 2 04:07 nmbd..log
-rw-r--r-- 1 root root 3816 Feb 2 04:02 nmbd.log.1
-rw-r--r-- 1 root root 420 Feb 2 11:50 smbd.log
-rw-r--r-- 1 root root 0 Feb 1 12:59 smbd..log
-rw-r--r-- 1 root root 2416 Feb 2 04:02 smbd.log.1
-rw-r--r-- 1 root root 760 Feb 2 02:07 test-pc.anil.log
-rw-r--r-- 1 root root 912 Feb 2 11:50 test-pc.dk.log
-rw-r--r-- 1 root root 304 Feb 1 13:03 test-pc.samba.log
-rw-r--r-- 1 root root 5100 Feb 2 11:48 test-pc.test.log
[root@Kickstart samba]#

Quote:
Quote:
[root@Kickstart samba]# smbclient -L kickstart
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
[root@Kickstart samba]# smbclient -L 172.16.11.149
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
[root@Kickstart samba]#

there is another interesting thing is that i haven't added the test user in samba but the windows 7 client is the test user i didn't enter that user in smbpasswd so when i try to login into the samba server with that user it easily authenticate the test user ??? i think something is mess up here

Quote:
[root@Kickstart test]# ll
total 0
-rwxrw---- 1 test test 0 Feb 2 04:09 New Text Document.txt
[root@Kickstart test]# pwd
/share/recycle/test
[root@Kickstart test]#
Error in user samba log

Quote:
read_data: read failure for 4 bytes to client 172.16.11.151. Error = Connection reset by peer
so as per the error i have make the change on smb.conf file & also changes the local policy of window 7 home basic

client ntlmv2 auth = yes


i have install the gpedit package in the window 7 home basic

below is the url for gpedit
http://drudger.deviantart.com/art/Ad...-msc-215792914
after run the that exe file the required file & directory is to copy at below locations
window/SysWOW64 folder and copy the
GroupPolicy, GroupPolicyUsers folder and the gpedit.msc file into the System32 folder

then start>run>gpedit.msc System and Security -> Administrative Tools -> Local Security Policy or local policy under that

Network security: LAN Manager authentication level
Send LM & NTML responses

Network security: Minimum session security for NTLM SSP based (including secure RPC) clients
Uncheck “Require 128-bit encryption.”

Network security: Minimum session security for NTLM SSP based (including secure RPC) servers
Uncheck “Require 128-bit encryption.”

Last edited by pantdk; 02-02-2014 at 09:55 PM.
 
Old 02-02-2014, 09:55 PM   #4
ericson007
Member
 
Registered: Sep 2004
Location: Japan
Distribution: CentOS 7.1
Posts: 735

Rep: Reputation: 154Reputation: 154
You have 2 users. Dk and test according to your config
There is a login error, so specify the user.

First make sure you added the user

Code:
 smbpasswd -a dk
smb -U -L //server
Also make sure the users exist on the host that the user has access to the actual folders on the computer.

The samba server does not know about the user root. So if you want to skip the -U switch, su into the dk account then connect to samba

Not related to selinux in this case.

Last edited by ericson007; 02-02-2014 at 10:04 PM.
 
1 members found this post helpful.
Old 02-02-2014, 10:04 PM   #5
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
earlier when i set the password of user anil & dk in samba it shown me the error of
Quote:
[root@Kickstart samba]# smbclient -L 172.16.11.149 -U anil
Password:
session setup failed: NT_STATUS_LOGON_FAILURE

but now you told me to reset that passwd of these user now it's working



root@Kickstart samba]# smbpasswd -a dk
New SMB password:
Retype new SMB password:
Added user dk.
[root@Kickstart samba]# smbclient -L 172.16.11.149 -U dk
Password:
Domain=[KICKSTART] OS=[Unix] Server=[Samba 3.0.33-3.28.el5]

Sharename Type Comment
--------- ---- -------
Share Disk Shared Folder
IPC$ IPC IPC Service (Samba Server Version 3.0.33-3.28.el5)
dk Disk Home Directories
Domain=[KICKSTART] OS=[Unix] Server=[Samba 3.0.33-3.28.el5]

Server Comment
--------- -------

Workgroup Master
--------- -------
MYGROUP KICKSTART
[root@Kickstart samba]#

Last edited by pantdk; 02-02-2014 at 10:05 PM.
 
Old 02-02-2014, 10:15 PM   #6
pantdk
Member
 
Registered: Oct 2011
Location: New Delhi
Posts: 248

Original Poster
Blog Entries: 3

Rep: Reputation: 17
earlier below are error in the user logs now it seems it's work fine.ericson007 thanks for suggestion of resting the password.but i don't know the reason when i have set the samba user in smbpasswd dk & anil at that time it shown me the error it the above of my thread i have set the passwd on dk & anil


[root@Kickstart samba]# tail -f test-pc.anil.log
[2014/02/01 13:04:49, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 172.16.11.151. Error = Connection reset by peer
[2014/02/01 13:06:31, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 172.16.11.151. Error = Connection reset by peer
[2014/02/01 13:09:49, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 172.16.11.151. Error = Connection reset by peer
[2014/02/02 01:53:43, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 172.16.11.151. Error = Connection reset by peer
[2014/02/02 02:07:55, 0] lib/util_sock.c:read_data(534)
read_data: read failure for 4 bytes to client 172.16.11.151. Error = Connection reset by peer
Quote:
[2014/02/03 15:09:07, 0] modules/vfs_extd_audit.c:audit_mkdir(182)
vfs_extd_audit: mkdir New folder
[2014/02/03 15:09:36, 0] modules/vfs_extd_audit.c:audit_rmdir(200)
vfs_extd_audit: rmdir storage

Last edited by pantdk; 02-02-2014 at 10:24 PM.
 
  


Reply



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
Samba OS X to Linux Samba file share error ttoomey Linux - Software 1 08-16-2005 10:12 AM
samba error! marlor Linux - Networking 2 12-31-2004 03:33 PM
samba error props666999 Slackware 16 12-20-2004 08:29 AM
Samba error cyrilbritto Linux - Networking 3 10-13-2003 08:53 AM
samba error bm1 Linux - Software 9 05-13-2003 12:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 10:16 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