command line copy files

I need to xcopy files from one drive to another, however I only want the files that are on or after a certain date. I found this handy command and it worked nicely.

Work best on Windows 7 and 8 computer.

c:\robocopy x:\ y:\ *.* /MAXAGE:20130101 /XO /E

Yes it basically uses “Robocopy”, and if you need more details on switches, checkout this link http://ss64.com/nt/robocopy.html

Connecting OwnCloud to Active Directory

I recently came across this open source “Dropbox” like application, it is truly something that our company has been dreaming for, so I quickly download a virtual appliance from Bitnami to try it out.

So far, it is all looking good except I am having difficulty to connect the application to LDAP, so I don’t need to recreate all the users again and they don’t need to remember another login account.  After trying very hard on Uncle Google, I found this excellent article which worked perfectly for me.

https://vorkbaard.nl/add-owncloud-6-0-to-active-directory-2012-r2/
Add ownCloud 6.0 to Active Directory 2012 R2 | Vorkbaard uit de toekomst

Connecting ownCloud to Active Directory

In Active Directory Users and Computers create a new user called owncloudaduser. It doesn’t have to be a member of any special groups. Give it a hard password and set it and the account to never expire. I created this user in the Users OU. This doesn’t really matter but keep it in mind when specifying the user’s DN in ownCloud.

ownCloud25

LDAP can be tricky. If your AD works you don’t have to deal with it but as soon as things start to disintegrate you will have to get your shovel and dig in the LDAP database. Windows Server 2012 provides a couple of tools; do some Googling.

Also it can be insightful to go into Active Directory Users and Computers, select your domain, click View and check ‘Advanced features’.

ownCloud26

Now Active Directory Users and Computers shows you a lot more information. Doubleclick a user and check out the new tabs. Especially handy is the Attribute Editor which tells you not only which attributes there are but also their exact values which can be very helpful when troubleshooting the connection between ownCloud and Active Directory.

ownCloud27

Right, back to ownCloud. Point your browser to http://192.168.77.130/owncloud and log in as ocadmin.

From the top right menu choose Users.

virtualbox_35

Note that there is only the one ocadmin user we created earlier. Normally this is where you would create ownCloud users.

Click on the ‘+ Apps’ icon bottom left.

virtualbox_30

In the apps list scroll down to ‘LDAP user and group backend’, click it and click Enable.

virtualbox_32

From the top right menu choose Admin.

virtualbox_33

Ignore the https security warning for now. Scroll down to the LDAP section. This is the section that has the Server, User Filter, etc. tab bar on top. Start out with the Server tab and fill out your own values. Remember you can find the DN of the client user in Active Directory Users and Computers.

virtualbox_36

The ‘Could not determine Base DN’ error is caused by a bug in ownCloud; don’t worry about it.

All values are instantly saved. Press F5 to reload the page and behold! You can now enter a Base DN.

virtualbox_37

Users.testnet.netwerk is the default (with your own AD of course) but you could just enter DC=testnet,DC=netwerk. This would give you all users in the AD, including system accounts that will never need ownCloud accounts.

Click the Expert tab and in the Internal Username Attribute field enter sAMAccountName. This way ownCloud’s internal usernames are identical to your AD usernames instead of the objectSid which is a long range of numbers.

virtualbox_39

Click the Save button on the bottom of the form after you change this.

Click the Advanced tab. Under Connection Settings check these options: Configuration Active; Case insensitive LDAP server (Windows); Turn off SSL certificate validation [for now]. Set ‘Cache Time-To-Live’ to 5 seconds for now. If you are done configuring change this back to 600 or so. You don’t want to wait ten minutes after every change to test if it is working.

virtualbox_38

Click the Save button.

Under Directory Settings enter these values:
User Display Name Field: displayName
Base User Tree: CN=Users,DC=testnet,DC=netwerk
Group Display Name Field: cn
Base Group Tree: DC=testnet,DC=netwerk (I’m not sure this makes any difference, I’ve never seen ownCloud pull non-system groups from LDAP)
Group-Member association: member (AD) (idem: this makes no difference but this is supposedly the correct setting)

virtualbox_43

Click Save, then click the Login Filter tab. You may now see a ‘Configuration incorrect’ message followed by a red square. Don’t worry about it; this is ownCloud being confused I guess.

Click the ‘Edit raw filter instead’ line and enter this text:
(&(memberOf:1.2.840.113556.1.4.1941:=cn=ocusers,dc=testnet,dc=netwerk)(sAMAccountName=%uid))
(I edited the screenshot a bit so it would show all text.)

virtualbox_41

The memberOf:1.2.840.113556.1.4.1941: key is interesting. It means “members of the following group, including indirect members due to group nesting”. This will include User4 even though User4 is not a member of the ocusers group.

sAMAccountName=%uid means “where the sAMAccountName value equals the string the user entered in the username field on the logon page.

The Login Filter tells ownCloud which users are allowed to log in and which LDAP attributes they are allowed to use for their usernames.

Clicking Continue will take you to the Group Filter tab and, if all went well, replace the error message by a happy ‘Configuration OK’ message followed by a green dot.

virtualbox_42

(Yes, I edited the screenshot so it would show all text.)

The Login Filter raw filter string you entered is very sensitive about changes in other places in the ownCloud administration web interface and even to reloads of the page itself. If you change anything check back here and fix the value if necessary. The fix may take but if you press F5 the default value is reset. I hope this will be fixed in future updates but for now it helps if you are aware of these… features.

Before continuing, check which users are listed in the User section (top right menu, Users). Note that there are too many.

Under the User Filter tab click ‘Edit raw filter instead’ and enter this text:

memberOf:1.2.840.113556.1.4.1941:=cn=ocusers,dc=testnet,dc=netwerk

Press Continue to save the value.

Check back in the top right menu under Users and verify that all intended users are present.

virtualbox_44

There’s a fair chance it won’t work the first time but it helps to know which values should work and once it works it keeps working.

Good luck and have fun!

Wake up your home machine

This is nothing new or exciting, it is just something I wanted to use recently – it is “Wake On LAN”.  Why I need it??  coz I want to save some money, so I decided to cut down the power usage, one of the best way is to turn off my computer during day time while I’m at work.  I used to leave it on 24/7 for BT, however it does consume a fair bit of electricity.

Back to WOL, it is actually widely used even in the dialup modem age, it is just too annoying and slow of course.  Right now, it is the high speed Internet age, hundreds of remote control software available, e.g Teamviewer, LogmeIn etc.  More importantly, they are free to charge.  The only problem is you have to leave your computer on all times, which isn’t what I want.

So here I want to share a link that shows how and what to do to setup WOL.

1.  http://www.ezlan.net/WOL.html

This is a very simple and straight forward website, you will be able to do this in 15 minutes.

2.  http://www.depicus.com/wake-on-lan/wake-on-lan-gui.aspx

Once configured, you need to download a tool to wake up your computer, the above link is absolutely brilliant.  It provides a GUI for you to input the require info, more importantly, it provides the application on different platform, I personally got the one on iPhone.

So now, I can put my computer to sleep during the day, I can also wake it up via my iPhone when I need it.  Beauty!

 

Cebit Australia 2011

I’m glad to be there at Cebit Australia 2011, I went to Sydney with my partner.  Although it was a bit tired, I really enjoy the show and the trip.   Unfortunately it doesn’t allow general entry to take photos in the show, I did took some photos from outside the show and some amazing products with permissions.

Here are the highlights from the show and the trip.

Free Helpdesk Software

Today I’m trying one of the free helpdesk software, download off the net called “SysAid”.  Not sure how popular it is, but it seems to be on the market for a while.  I can’t really compare it with the popular ones but for what it does and free of charge (most importantly), it’s really good.

Originally I was looking for free “Knowledge Base” software, this software does a lot more.  It handles helpdesk ticketing system, asset management, remote support (yes, it builds in), system monitor, performance benchmarking and more … well, I’m still trying it, so I can’t really comment on it.  If some used this before or know something better, please drop a few word.  Otherwise, this is handy if you are looking for the same thing.

http://www.ilient.com/