swarm32: (thalban)
Turns out that the unix extended ACLs control the access to the samba share in Openfiler (and in ldap setups) and that ZFS on linux does not have them turned on by default. I also had to replicate the ACL setup from the shares in Openfiler to the new host using getfacl and setfacl.
After restarting the smb service, I was able to access the share. For now I'm glad I don't have to change permissions very often.
swarm32: (thalban)
A little background is in order. Several years ago I set up a CentOS 5 LDAP server and two virtual machines running Openfiler 2.99. Since then the Openfiler project has gone more or less defunct and hasn't seen any significant activity in over a year. The two Openfiler machines rely on the CentOS LDAP server for authentication.

I have been working on migrating the primary filserver over to my new Rackable 3U server running CentOS 7 and ZFS and so far it's been an uphill battle. I thought I could cheat a bit and copy the samba.conf from the main Openfiler VM to the new machine and it would work. Turns out there is more setup behind the scenes for Samba and LDAP to play nice than expected, plus there are features that have been changed or depreciated between Samba 3 and Samba 4.
And then their are SIDs. A SID is an identifier used by Samba and Active Directory to distinctly identify things like users, groups, and computers. While this is spiffy, things apparently go sideways in a setup like the one I have where I have multiple computers that aren't on a domain but are joined to LDAP.
"The primary group domain sid(S-1-5-21-[LOCALSID]-1236) does not match
the domain sid(S-1-5-21-[LDAPSID]) for someid(S-1-5-21-[LDAPSID]-5708)
check_sam_security: make_server_info_sam() failed with
'NT_STATUS_UNSUCCESSFUL'
check_ntlm_password: Authentication for user [someid] -> [someid]
FAILED with error NT_STATUS_UNSUCCESSFUL
"
Is a rather infuriating error to receive, in part due to the fact it does not show up in the default log level of Samba. In combination to this, I was getting errors like "mount error(6): No such device or address" or "CIFS VFS: cifs_mount failed w/return code = -5" and Windows 7 would see a list of shares but complain they did not exist when trying to connect.
What I ended up doing to resolve it was to copy the machine SID from the original Openfiler box that I created the accounts on to the machine object for the new server in my LDAP tree.
On top of this, I had to use authconfig-tui to set up ldap on the new server, as well as add a samba config to /etc/pam.d . I was able to copy the latter from my existing opefiler box.

Now, onward to seeing if I can get something other than access denied on my newly visible shares.
swarm32: (Default)
Been working on setting up my new Openfiler 2.99 VMs on top of the nice new 2TB hard drives I picked up and had some interesting results trying to get everything set up.

A big part of my trouble has been that I want to set up two openfiler VMs with sycnronized usernames and passwords. The two options for that are LDAP and Active Directory. Since openfiler has a built in LDAP server, I figured I'd see if I could get one openfiler to serve as the LDAP for the other. After several hours, and a couple of changes to the LDAP config from the command line, got the one server to speak to the other. Big problem though, is source openfiler box could no longer properly use its local LDAP server. Big bummer there...

So, I found this tutorial on how to set up an openfiler compatible LDAP and promptly spawned a new VM with CentOS 6 (why not right?). Turns out the LDAP server uses a new LDAP configuration format that is not yet supported by most third party tools, and there is not a lot of good (at least to me) information on how to start setting one up. After some finagling, got one up and running though, but hit another roadblock. I could not get the Openfiler VM to connect to the LDAP correctly. So after an afternoon of swearing, decided to start from scratch on CentOS 5 as there is a lot of good material on that. So after using a set of tutorials on centOS 5 ldap, centOS LDAP TLS and some fun with LDAP Explorer Tool on windows, had what appeared to be a functioning LDAP server.

But, the openfiler refused to log in when entering the creditials in the WebUI. After some digging, ended up manually specifying the settings in the /etc/openldap/ldap.conf and server page reloads later, it finally connected and appeared happy. So, I started adding in groups to the LDAP tree using the Openfiler interface and then went to add a user.
Openfiler started blowing an error that it could not update the password. As most of my issues so far had been LDAP related, decided to bark up that tree some more. Much to my surprise, the update command from the command line worked perfectly.

So, I started digging into the admin code, trying to see if there was an error in it. Change the setLDAPpasswd function in /opt/openfiler/var/www/includes/ldap.inc to echo out the text output from the LDAP update and tried again. Got back the number 1. After scratching my head for a moment, realized that the previous state for the smbpasswd statement also issued a return. Changed that to also return full text.

I had a hint now. "failed to add entry for user" After doing some digging and reading a couple of posts on the ubuntu forums about similar issues, decided to attempt the command manually. Threw an error about not being able to talk to LDAP over TLS. Turned off TLS in the openfiler UI. Password update from the UI worked! Now, if I really felt like it (which I don't right now) I would sit down and figure out why it was not using TLS correctly. My guess would be something to do with the self-signed certs.
I'm going to play around with it some more, hopefully box number 2 will not be so painful this time around.

*edit* Also, here is Install VMWare tools on openfiler 2.99.

Profile

swarm32: (Default)
swarm32

April 2025

S M T W T F S
  12345
6789101112
13141516171819
2021 2223242526
27282930   

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 25th, 2025 05:56 am
Powered by Dreamwidth Studios