Showing posts with label samba. Show all posts
Showing posts with label samba. Show all posts

Sunday, 16 March 2014

mdadm with 4tb HDDs + kernel tweaks for improved speeds pt3 (samba config)

So it's all done right?

Well I thought I'd share this lil snippet.

When deleting a file on a network share e.g. Samba shares delete, deletes permanently. It doesn't move it to a 'trash can' or 'recycle' bin.

To enable undelete, use this tweak under your samba share declaration:

[share] 
vfs object = recycle
        recycle:repository = .deleted/%U
        recycle:keeptree = Yes
        recycle:touch = Yes
        recycle:versions = Yes
        recycle:maxsixe = 0
        recycle:exclude = *.tmp
        recycle:exclude_dir = /tmp
        recycle:noversions = *.doc

Where the file will be moed to the .deleted folder under your username.
 

Monday, 12 August 2013

Accessing Windows 2012/2008 shares with sambaclient and NT_STATUS_LOGON_FAILURE

Ok
so we migrated from a Windows 2008 server to Windows 2012, and our automated build system hudson could no longer copy it's files over to the new server.

using smbclient to create a directory on the fileserver, didn't work after we migrated.

smbclient //server01.corp/dfs_shared/ -U username%password

The old file server could authenticate us, with both the hudson account and our domain admin accounts. The new file server couldn't.

we checked:
firewall rules (hardware)
firewall rules (windows)
local policy (Net lanman auto type -v1/v2)

Eventually,

I figured out this worked.

smbclient //server01.corp/dfs_shared/ -U domain\\username%password

The reason being that we were now authenticating against a file server ONLY. The previous server was also a domain controller (which has no concept of a local account). As the new server was a file server only, when it was authing, it was checking against it's local account, which obviously, doesn't exist.