OmniScience-web



Joys of dscl

Well, today's miniblog is really just an aide-memoir for me and a Googlable entry for others, about how to use dscl - Apple's command line tool for queerying and amending entries in the OpenDirectory of users on the server.

If the above makes no sense to you I fear this Blog probably won't help that much but let me set the scene...

Users on a Macintosh are 'stored' in a structure referred to as OpenDirectory - technically this is some form of 'abstraction ' and I'm happy to correct this blog if anyone points out that that isn't quite correct. It's based on LDAP as an opensource standard if that helps.  Basically it means that all aspects of the operating system can authenticate services against user names and passwords.  You may have noticed that there's a LogIn button at the bottom of this page.  If you click on it the wiki can use OpenDirectory to check to see  if you're allowed to log in.

Now, one of the things that I want to be able to do for this, and other websites, is allow people to update their entries in the system after they've been allocated a username and password, Particularly, if I were to implement a system where new users were automatically allocated a username and password, I'd like people to be able to change them via the web.  Now, I've managed to track down a .cgi script that allows people to change their password (written in c by the way) but I have singularly failed to find anything that will allow them to give an 'alias' to the name that they are allocated.

As you may imagine there exists a very nice tool in OS Server, WorkGoup Manager, that allows me to do this because I have access to the server so I know it can be done.  So, my first thought was to use AppleScript to automate the process.  A day or so's searching made it clear that this is less than trivial but i came across a site, www.sentman.com which offers a nifty little utility called "acgi dipatcher" that provides the hooks to achieve this.  Unfortunately the download fails due to expiry of come elements of the code and the host of the site seems too busy to respond to emails - I think he may also in the process of turning it into a commercial product.  Anyway, a dead end. (It's possible that another piece of software that he sells,  X2Wwb might do the task but it's pretty heavily geared to yet another piece of software that he has for controlling a plug-in board and although I saw some light at the end of the tunnel, it seemed a vVERY long tunnel.  So I stopped)  Actually it turned out to be a double dead end because when I actually took the time to check the WorkGroup Manager application that performs the OpenDirectory tasks on OS X Server, I found it's not scriptable!

So....  a bit more Googling brought up dscl.  This is a command line tool that Apple has for accessing the OpenDirectory structure - try Googling "dscl Leopard " to see the sort of info I managed to find.

As with most Unix commands it rather assumes that you know how it works before you start - learning is a pretty hit and miss process but to get you going this was a good reference Easing into dscl

What follows in SPECIFICALLY relevent to how I've got OS X 10.5 set up, I fear I cannot guarantee that these line will work first time on your installation.

launch the terminal application on the server and type the following

dscl localhost list /

This should list the 'folders' within the root of you system.  By adding folder names that you can see you can burrow down to,

dscl localhost list /LDAPv3/127.0.0.1/Users

which will return a list of the users on your server

Now you can use

dscl localhost read /LDAPv3/127.0.0.1/Users/username 

and this will list all of the details that are stored about a particular user.

Now, I had a bit more of a problem amending details owing to the need to authenticate so the addressing has to be a bit different.  A day's frustration ended up with the following that worked

dscl -u adminname /LDAPv3/127.0.0.1 append /Users/username RecordName newname 

This will then ask you to enter the password for your Directory Administrator and Hey Presto.  It's done!

It took me two days to achieve and half an hour to write it up.

Enjoy.






0 comments

iChat works

Well, this merits a little blog....

I just got off my first successful, meaningful, iChat conversation. After three weeks away and nothing more than emails and a few posted blogs from my son, Llewe, we were both in the right place at the right time such that we were able to iChat.

Sadly, the bar he was in doesn't enable a video link but it was a remarkable experience. We managed to communicate well enough to set him up to screen share with his own iMac at home. As a mild aside, it makes a bit of a mockery of internet censorship in that one of the things he is not able to do in China is bittorrent. By using his mac at home he can! I hope to god they don't bang him inside for it. 


If you want to know what he's up to you check out his blog or the Yunnan Normal University website (he's the tall blond)

0 comments

Big Blog, Little Blog

OK, so this is what I'm going to do...

Blogs will be designated as either bigblogs or littleblogs. You will find filters on the RHS of your screen so that you can choose which ones to view -

I know this works in Safari 3. and Firefox 3. on a MAc. I haven't checked it out on a PC yet
.


0 comments

Keep it simple

I'm not sure I've really got the hang of this blogging lark.  I still keep trying to write articles - which is not the point. 

So...  in future blogs will contain pointers to the articles I feel compelled to write. Which might take a while to form, but I don't think that's a problem.

I've been checking out the blog of an old, respected, friend ( Jonathan Sanderson ) if you want to see what I think a blog should be like.

2 comments

Do the right thing


It doesn't matter how much time and effort you put into doing the wrong thing well, it still ends up being the wrong thing to do. 

(Lipstick on a Pig anyone?)

This statement of the obvious came back to mind recently following to my purchase of an iPhone for my wife's birthday. She loves it with a few gripes but it does what she needs doing in a way that is relatively natural to her. It occured to me to ask a simple question; In what way is the iPhone NOT a Newton. Now, some of you will be too young or have simply forgotten all about he Newton, Apples's first forray into the Personal Digital Assistant market. It was, not unsurprisingly, 'ahead of its time'. Launched in 1993, the Newton project was effectively killed after Steve Jobs returned to Apple, in 1998. In many respects the iPhone IS the new-Newton with a nice phone (and camera) added in. But in certain respects it is definitely NOT the new-Newton. Most importantly, for me at the moment, it doesn't atempt handwriting recognition, it uses gesture to invoke actions. Now this is an example of chosing the right thing to do (and then doing it well). I'm not going to say that it was the 'flakey' handwriting recognition that did for the Newton but, if you ask those who do remember it what their undying memory of the Newton is I'll bet 9 out of 10 of them will mention the handwrititng.

In some respects you might feel that trying to make an electronic notepad, that you can write in like an ordinary notepad, is an example of taking something that works well in ordinary life and making it 'better'. It certainly didn't work well for Apple but more importantly I'd challenge the logic that writing is an intrinsically good thing. It HAS become something of a accepted truism that the development of modern civilisation was dependent upon the invention of the printing press but I have come to feel that this is a proposition argued by those who are successful in modern civilisation, i.e. those who can read and write!

A number of years ago I was asked to give a series of lectures for the Communications Network (formerly the British Telecom Engineers professional body but subsequently opened up after the breaking up of BT 'monopoly'.)  Anyway they asked me to address the history and potential future of communication.  Not an intimidating request or anything!

I covered the history (skimmed really) and when it came to the future I argued that the communications industry should be trying to enable people to communicate in the way they wanted rather than developing techniques that were easy to implement and then persuading people to communicate that way. I argued that the 20th century would come to be seen as a technological diversion into analogue technology. Prior to Edison's development of the Phonograph, communication was a digital system - think telegraphy, Morse code, semaphore. ( It's an aside but, language, although transmitted through the air by an pressure waves that can be described by an analogue function, is intrinsically digital.  It is composed of distinct logical components e.g. words, concepts.) The 20th Century was the analogue century because that was the technology that the communications industry could develop to record (encode), transmit and decode at speed. But the discovery towards the end of the 20th century was that digital systems (especially binary) are in principle the most efficient way to perform those functions.  By the end of the 20th century technologists had the ability to "do the right thing" and go back to digital systems.  From 1980 to 2000 lots of science communicators struggled to explain to the public what all this 'digital' stuff was all about.  Perversely, nowadays children are largely unaware of the idea of analogue recording and communication.  The struggle is to explain why people would do it that way - assuming that you feel the history lesson is worth it.

So, communications has gone digital but what do they do with it?  Well, we can still make our phone calls (which is nice) and they've certainly made the process of calling someone back more natural by the simple expediency of giving us the 'reply' button so that we don't need to remember and key in an individual's phone number.  They have also given us the text message which is like the curate's egg - good in parts.  We can compose our message at leisure, it can be compressed efficiently and the recipient does not need to be 'on line' to receive it.  All good.  But it uses the written word ( not HANDwritten but an even more obtuse and difficult process that has generated an entire dialect of English, and presumably other languages) Which is bad. This is not "Doing the right thing",  What I wanted them to develop is a facility to record a spoken message, compress it efficiently and then send it to the recipient where it could be listened to at leisure. This seems a much more natural way to send someone a message.

To be contentious I also suggested that the past 100 (or perhaps 500 years if we go back to Caxton and the printing press) would come to be seen, historically, as the diversion into the written word. One hundred years ago most people in the UK could not read and write because they weren't taught to because they didn't need to.  The ruling classes could employ secretaries to read and write their letters and the working class had no need to read and write if they worked 18 hours a day in a factory.  It was the middle classes who learnt to read and it is they who have over time raised the ability to read and write into a badge of education.  I COMPLETELY accept that the introduction of universal education was, and still is, a major foundation of social change.  But reading and writing is only the basis of that because that's how we choose to record and reproduce information - e.g. books and newspapers.  Most parents are overjoyed as their children learn to read; firstly because it signifies a passage into adult independence but, secondly, because it signals the end of interminable bedtime stories!  But ask any child or, I would suggest, adult whether they prefer reading or being read to and I would bet 9 out of 10 would go for the audio rather than ocular input.  This perspective has over the years been accentuated by the discovery that my son is dyslexic and the realisation that, to some degree, so am I (I can't describe the agony that is putting down my ideas in written form!)   Although the prevalence of dyslexia is relatively low I think that mild degrees of dyslexia are common, in a form that can be described as "I don't read or write that much - I prefer to watch the tele"

The internet was traditionally not about communication in the sense of dialogue but about enabling diatribe (or less contentiously dissemination of information) I suggested that this intrinsically biased it towards readers and writers.  Which I don't think is "Doing the right thing". Technologically it was easy and seemed appropriate to the readers and writers who created the web but it's not what most people want.  If only I got a penny for every video that has since appeared on YouTube I wouldn't be typing this!
 
On a wider level I challenged the communication's industry to develop ways of enabling people to communicate, i.e. dialoue.  Well, Web2.0 is supposed to be all about communication but I fear that it's still bogged down in reading and writing.

0 comments

Why are we here?

Ok, rather a portentous title for a first blog but it forces me to address the important question of why, after years of prevarication I've started to write a blog. (Why you're here is another matter but I'll allow you to respond if you feel it would be informative).

The primary reason for this blog going live today, as opposed to next week or whenever, is that I went to a meeting at the British Library last night, organised by TalkScience and Nature, which was looking at what relevance Web 2.0 has to scientific research. You can download a podcast of Timo Hannay's talk from Nature (I think) but I don't think you can obtain any details of the following discussion.

It was a good meeting, better than I had expected, but I was surprised to discover that the main theme of the practical relevance of Web 2.0 was as to what role blogs do, could or should play in scientific research. Do leading scientists blog (No) Should leading scientists blog (maybe) but if they do what should they be trying to achieve?

Well, I won't bore you with the details of what people felt but rather make it clear that whilst I wouldn't describe myself as a leading scientist, it made me feel that I should blog.

So what do I hope to achieve? Well,

  • Keep a record of the things that I'm thinking about, and hence, what I currently think is interesting or important.
  • Discover/create a group of people who find what i'm thinking about worth reading and responfding to.
  • Help me to develop these ideas, both on my own but almost more importantly collaboratively with those people.
Now, a key thing is that these blogs are not intended to be finished items, finely honed prose that would grace the pages of a journal. I've set myself 15-30 minutes per day - no more at one time. Let's just see what happens!

I don't know where this will end up going but I think that that's 1/2 the point.

Just to finish, here's a list of the sort of thiings that I'm thinking about these days and which I hope to get around to writing about.

  • Public Undestanding of Science - specifically the use of demostrations to make science 'real'
  • OmniScience - a project that I've been trying to get off the ground for years!! I'll tell you more 'real soon now'
  • Using a Mac OS server to tryand achieve these aims
  • The Speed of Everything - a book that I've been failing to write for a number of years now.
Let's see how it goes.

2 comments