Posts Tagged ‘Windows’

Really quick follow up, Ubuntu + Active Directory…

Wednesday, July 19th, 2006

By now, if your still reading, you might be bored to tears with the topic but I made some serious headway today. I’ve got ACLs working so that a Windows user can set permissions and take ownership of folders and files. This was stupid easy by adding acl to fstab:

/dev/hda1 / ext3 defaults,errors=remount-ro,acl 0 1

Yup, that easy. The only outstanding thing is granting sudo rights to AD groups, I can to individuals but oddly not groups. Need to figure that one out.

So by this afternoon I had a fully functioning file/web/database server that has joined a Windows domain. Last on the list, beyond sudo, is getting Sendmail to rely mail to the Exchange server so that our web apps are fully functional.  I am fairly certain I can find a work around tomorrow to get that going.
Nap time.

Follow up thoughts on Ubuntu plus Active Directory

Tuesday, July 18th, 2006

One of the key things that was missed in the HOWTO I linked yesterday was enumeration of users and groups by winbind. If you do not have this set to ‘yes’ than you’ll be gnashing your teeth in frustration trying to set up shares with Active Directory permissions. Check it out:

smb.conf–>
[global]
# Changes
security = ADS
netbios name = linux-foo
realm = bkm.com
password server = ADS.foo.bar
workgroup = FOO
idmap uid = 500-10000000
idmap gid = 500-10000000
winbind separator = +
winbind enum users = yes
winbind enum groups = yes

winbind use default domain = yes
template homedir = /home/%D/%U
template shell = /bin/bash
client use spnego = yes
domain master = no

Wth that set you should be able to run getent group and see both the local groups as well as the AD groups which will then allow you to set AD permissions in the Samba share:

smb.conf–>
[Foo-Public]
comment = Foo Public Directory
read only = no
browseable = yes
path = /shares/public
users = @”FOO+Domain Users”

At the moment I have it semi-granular rights working in that everyone can browse the shares but only certain groups  possess Read-Write-Execute rights. If I switch browseable = no than people just need to know the location of the share to get to it, i.e. security through obfuscation. So the challenge that remains now is to use the ACLs as determined by AD and to find a way to edit those ACLs through the Windows MMC. A thread over on the Samba newsgroup talked about needing to enable ACL on the mount point in fstab so I’m going to add another disk in VM-Ware and then mount it with ACL turned on rather than futzing with my primary mount. If I can get ACLs working than likely I can tighten security so that it is only viewable to those as indicated rather than to the general public.

Makes my eyes bleed.

Sometimes you want Ubuntu to talk with Active Directory

Monday, July 17th, 2006

So for the last couple of days I’ve been banging away on getting an Ubuntu box to authenticate against our Windows 2003 domain and if I’m successful I’ll be able to proceed with developing a new intranet based on FLOSS tools. So far everything has been progressing well in that the set up and configuration of krb5, Samba, and Winbind came off largely without a hitch thanks to the excellent How-To posted by tfieldfer. The only comment I have to add is that caps lock is your friend when performing net join ads and running kinit: your domain should be in caps like so james@FOO.BAR.

At the moment we are able to have all users in the domain login via GDM and auto-create a directory under /home/DOMAIN/username but the catch is that they cannot browse the network without running kinit, but (and it is huge but) the user has to be a domain admin. Head scratching for sure and added to the confusion is the fact that the sudoers list is not picking up the unix admins group we set up. Not that we really need uses to login, it was more of an exercise to see if we could roll out some non-windows boxes to folks who just need mail, Internet, and office applications (that would account for 99% of the company if it weren’t for the proprietary Windows based business system we run).

So what remains? Running a website will be the easy part. The big task is that we need to ensure that file sharing works, that a windows client can map a drive to a share on the Ubuntu box and additionally offer granular rights based on both individuals and groups as dictated by Active Directory. I’m making the slow crawl through The Official Samba HOWTO, dry for sure but I am hopeful that I can dig out some solutions and answers to our myriad and numerous questions.

At the very least the project is keeping my mind busy and imparting some solid Linux admin skills.

TightVNC, SSH, PuTTY, and You!

Tuesday, June 27th, 2006

So this morning I was in a bind, I’m sitting at work and wanted to listen to my music collection at home but my player was telling my that the share didn’t exist, to fix it I needed to reboot the box. Since the collection is served up by Media Jukebox it is housed on a Windows box which further complicates matters because I have no real command line tools at my disposal, the only way I can interact with the box is through TightVNC. Now, TightVNC is running on all the boxes but when I installed the new router I made the conscious decision not to punch the ports for it so I’m back to square one. Enter PuTTY and SSH.

While at work I use PuTTY to connect to my server at home, it is all command line which is fine for nearly 99.9% of the tasks I perform but when I have to administer that one lone Windows PC I’m out of luck. So to work on that box I’ll either need to punch holes or set up a tunnel using SSH and PuTTY. I opted for the latter which proved to be so easy I was surprised. The University of Stockholm has a well written tutorial on it that I used to get things rolling in under five minutes.

The key point to remember is that the tunnel needs to be configured from the perspective of the host machine so the default TightVNC settings would be localhost:5900.

PuTTY Tunnel

Then all you need to do is setup the session like you normally would, connect, log in, then launch TightVNC and point it towards localhost and viola! Now I just need to think of other applications where tunneling would be handy–secure surfing at Internet cafes come to mind.