Showing posts with label Microsoft. Show all posts
Showing posts with label Microsoft. Show all posts

Thursday, January 4, 2018

Not all active directory users appear when using getent passwd - Joining Linux to Active Directory

We set up some Ubuntu 16.04 LTS workstations with Active Directory integration. It's works with Evolution with EWS support and passes on the credentials which is super nice. But not all of our Active Directory users could log in.

If I ran wbinfo -i I would get all the users in AD.
If I ran getent passwd I would get a subset of my AD users, specifically older accounts.

What I finally found was this: Most tutorials tell you to put the following lines in /etc/samba/smb.conf

idmap uid = 10000-20000
idmap gid = 10000-20000

What those lines do is translate your Active Directory SID to a unix UID (and GID.) It does this by taking the last section of your SID and adding 10000 to get your new UID. So, for example, if my SID ends in -0900 my UID would be 10900. (900+10000=10900.)

The problem is that we've had the same domain for many, many years so our SID are getting up there. A recent user had an SID ending in -29111. So his UID became 39111 which was past the range set up above. Anyone above that range isn't given a UID and therefor can't be logged in.

To fix this I changed the lines in /etc/samba.conf to

idmap uid = 10000-100000
idmap gid = 10000-100000
After doing so and restarting the client for good measure all my Active Directory accounts appeared when I ran getent passwd.

Tuesday, November 1, 2016

Free/Busy and Out of Office (OOO) Issues When Migrating from Exchange 2007 to Exchange 2010

I'm in the process of migrating from Exchange 2007 to Exchange 2010. (Wait, was this post written in 2016? Yes, I know. There are extenuating circumstances.) Instead of configuring lots and lots of servers to send email to the IP of the new Exchange 2010 server, I decided to swap IPs between the Exchange 2007 and 2010 server.

I went through and adjusted the URLs under all the Client Access categories: Outlook Web App, Exchange Control Panel, Exchange ActiveSync, etc. After making the changes I ran into two issues:


  1. Issue: Exchange 2007 wasn't able to find itself via DNS.
    Fix: Turns out the person who built it put in a host file and hard coded the IP in that.
    Here's where to look for that:
    C:\Windows\System32\drivers\etc\hosts
  2. Issue: Free/Busy information wasn't working for mailboxes on the Exchange 2007 server and Out of Office messages couldn't be set.
    Fix: There are URLs for the Web Services Virtual Directory that need to be updated but are not available (as far as I know) via the Exchange Management GUI.
    1. I opened Exchange Management Shell
    2. I ran this command to see the URLs assigned to each EWS.
      Get-WebServicesVirtualDirectory | select Identity, *url* | fl

      Identity             : Exch07\EWS (Default Web Site)
      InternalNLBBypassUrl : https://Exch07.my.biz/ews/exchange.asmx
      InternalUrl          : https://mail.my.biz/ews/exchange.asmx
      ExternalUrl          : https://mail.my.biz/ews/exchange.asmx

      Identity             : Exch10\EWS (Default Web Site)
      InternalNLBBypassUrl : https://Exch10.my.biz/ews/exchange.asmx
      InternalUrl          : https://Exch10.my.biz/EWS/Exchange.asmx
      ExternalUrl          : https://mail.my.biz/ews/exchange.asmx
    3. Clearly mail.my.biz isn't going to work for two different servers. I needed to fix the internal URL and the external URL on my old 2007 server.

      Set-WebServicesVirtualDirectory –Identity “Exch07\EWS (Default Web Site)” –InternalUrl: https://Exch07.my.biz/ews/exchange.asmx

      Set-WebServicesVirtualDirectory –Identity “Exch07\EWS (Default Web Site)” –ExternalUrl: https://Exch07.my.biz/ews/exchange.asmx

      NOTE: You need the quotes and the whole string from the Identity field.
    4. Then I restarted IIS on my Exchange 2007 server.
      It took a few minutes but the Free/Busy information started to populate and my ability to set Out of Office responses came back.