azekeil: (Default)
[personal profile] azekeil
Contrast and compare:

Programmatically adding an email alias on Linux:
echo newalias: mylinuxaccount>> /etc/aliases

Programmatically adding an email alias to Exchange on Windows:
  1. Realise there's no simple file to edit. Figure out how to do it using Windows Powershell.
  2. Put the commands in a file. For some reason it's refusing to run. Oh, scripts have to be signed now. Look through that faff. Realise that you can just tell Windows that it doesn't need scripts to be signed. Do that. It now runs.
  3. However, when you put the commands in a file, it doesn't work. Realise that you were using the Exchange powershell, but that's not available as a command. Finally manage to google that you need to load the Exchange add-in using a command in the script; now it works!
  4. Proceed to research a way to get the command to be run from Linux. Try various methods, but all seem to result in various dead-ends due to Windows new 'security' contexts, which despite the fact I've logged in fine, Exchange doesn't like the credentials I was using. Foiled.
  5. Through googling I realise I can run the task as a scheduled task, if I request it on demand! Win! I suppose I can output the results to a file (as scheduled tasks aren't interactive) and just pick them up afterwards. Ah, foiled, I can't pass arbitrary parameters to a scheduled task. Oh, win again - I can just run a batch file which runs another batch file I've created that contains the actual commands I want running (with parameters) and then collect the output from a file afterwards.
So, in pseudocode:
  1. Log in remotely and write commands to batch file.
  2. Run scheduled task on demand, which manages to run in the correct security context for the commands I want to perform, by running a batch file which calls my batch file I've just written with the commands in.
  3. This in turn runs a powershell script, which I've disabled the check for signed scripts on, which actually performs the addition of the alias within Exchange.
  4. The output of this all gets dumped into a file (because I'm running a scheduled task non-interactively), which my script reads and passes back to the calling Linux program.


Now all I've got to do is wrap that all in a web interface to allow easy changing of email aliases...

Windows - despite improvements to allow scripting and the like, you still truly suck in terms of being easy and logical to understand and automate.

Date: 2010-02-07 12:04 pm (UTC)
From: [identity profile] swaldman.livejournal.com
To be fair, you including "learning how to do it" in Windows, wheras you already new how to do it in linux.
But I accept that there's still a disparity...

Date: 2010-02-07 12:20 pm (UTC)
From: [identity profile] azekeil.livejournal.com
Yeah, but under Linux the learning process is:
  1. Look up how to add a new alias. Oh, it's just a file.
  2. Use existing basic linux file manipulation knowledge to do the job.
My point is the way to learn or understand about Windows is just non-obvious and doesn't build on anything that pre-exists. With Windows it's always about working around deficiencies, whereas with Linux it's about using what you already know to work out how to do the new thing, in general.

Date: 2010-02-07 12:28 pm (UTC)
ext_157651: face (Default)
From: [identity profile] meltie.livejournal.com
There has to be an API call for that.

Date: 2010-02-07 12:35 pm (UTC)
From: [identity profile] azekeil.livejournal.com
Oh god, you're so fired.

Date: 2010-02-07 12:47 pm (UTC)
ext_157651: face (Default)
From: [identity profile] meltie.livejournal.com
I'm serious, I bet there's a SDK call for it.

http://msdn.microsoft.com/en-us/exchange/default.aspx

:)

Date: 2010-02-07 01:23 pm (UTC)
gerald_duck: (frontal)
From: [personal profile] gerald_duck
That's the thing: Windows thinks about such issues completely differently from Unix. It's simoply not about files in the filesystem.

If I were in your position, right now I'd be finding out where Exchange puts its aliases — my guess would be Active Directory — and then finding the appropriate API to create an alias. From a Unix box, possibly you can do it using LDAP, for example?

The Windows Way in such matters means firstly that changes can get replicated smoothly amongst several servers and secondly that they can be noticed without polling the file's datestamp. Admittedly, polling a datestamp under Linux is about as cheap as the cheapest of Win32 API calls, and rsync will cover a multitude of sins.

I'm no Windows apologist: I think Unix is clearly better. Just not as clearly better as the Unix users who never touch Windows sometimes think.

Date: 2010-02-07 01:49 pm (UTC)
From: [identity profile] azekeil.livejournal.com
The thing is, I used to use Windows, and I moved to Linux because I could more easily understand how to automate it. Yes, Windows has advantages in terms of replicating configs around automatically behind the scenes.

But I'm not a programmer really; I'm sure it doesn't need to be this complicated.

Surely I'm not the only person who thinks like this?

Date: 2010-02-07 02:51 pm (UTC)
heavenlyevil: Painting of a fairy croched menacingly on a flower. (Default)
From: [personal profile] heavenlyevil
Nope. You're not. :D

Date: 2010-02-07 03:02 pm (UTC)
From: (Anonymous)
There are two issues to consider here, the first being that this is an application specific issue - if you sat down on my UNIX-based mail server and edited the alias file the result would be underwhelming, since I'm using a mailstore that holds account and alias information inside a SQL database. Yes there are command line tools to manage them, but you'd still have to go and research how to do it.

Second is the expectation as to how systems will be managed; Microsoft's model assumes that only a small number of users, operating on behalf of the organisation as a whole, will be authorised to make such changes and that they will be granted access to the existing Exchange GUI. It becomes a procedural issue in most cases. You're looking to use a different paradigm and your problems mostly lie in the gap between the two.

Date: 2010-02-07 04:55 pm (UTC)
From: [identity profile] azekeil.livejournal.com
That's true. I am using a sledgehammer (Exchange) to crack a nut (personal email/groupware). But I still hold that Windows (at least to me - perhaps I'm just too thick/lazy) is unfathomable.

Windows has been criticised for being too open, and they've made great strides to correct that - in fact in some ways it's probably more secure than Linux, for example on the default position of scripts that should be signed. It seems to me like a case of over-engineering where the *nix philosophy is a straightforwards but flexible design with lots of small tools built up to provide the functionality - but most of all, openness and obviousness within the design.

Yes, I'd have to look up how to add aliases if my mailserver software used a database, but as you say I could automate it without having to jump through a slew of hoops, some of which just don't even make any sense to my mind (the insufficient/different security context for remote logins).

Enterprise software on Windows is on the whole easier to manage than enterprise software on Linux, in my experience, but software on linux (enterprise or otherwise) is still easier to tinker and customise in my view.
Edited Date: 2010-02-07 05:02 pm (UTC)

Date: 2010-02-07 03:12 pm (UTC)
From: [identity profile] gashinryu.livejournal.com
So, in other words...

Clap pat, clap pat, clap pat, clap slap
Clap pat, clap your hand, pat it on your partner's hand, right hand
Clap pat, clap your hand, cross it with your left arm
Pat your partner's left palm
Clap pat, clap your hand, pat your partner's right palm with your right palm again
Clap slap, clap your hand
Slap your thighs and sing a little song, go.

Date: 2010-02-07 05:08 pm (UTC)
From: [identity profile] azekeil.livejournal.com
...something like that ;)

Date: 2010-02-07 04:40 pm (UTC)
From: [identity profile] hwc.livejournal.com
This is the most awesome comparison of the Unix Philosophy (http://en.wikipedia.org/wiki/Unix_philosophy) and the Windows Lack-of-philosophy.

Date: 2010-02-07 05:08 pm (UTC)
From: [identity profile] azekeil.livejournal.com
I suppose this can only really descend into a religious OS war, which I was kind of cognisant of when I posted this, but Windows did ask for it in this case I feel ;)

I hadn't actually read any of the arguments that seem to back my view, but here are a couple I found and started reading:

Date: 2010-02-07 05:17 pm (UTC)
From: [identity profile] punkwalrus.livejournal.com
Managing both Exchange, Exim, and a proprietary yet BSD-standard mail system (Cisco IronPorts), I'd say 15% of my work is doing something in Exchange, which takes 90% of all time I spend on configuring and troubleshooting mail. I won't say Exchange is "broken," really, because when it works, the Wizard behind the curtain somehow works. But when it doesn't, the troubleshooting is like wrestling with a bear called a "GUI."

A friend of mine who worked for Microsoft in the Windows 95 days told me something that shed a little light on the subject. Paraphrasing:

"Microsoft, when all is said and done, is a BUSINESS. There is nothing wrong with being a business. But to be one, you have to make a profit to survive. And one of the major tools in this is marketing; Microsoft is a marketing powerhouse. They look at all Windows systems as a *product* and sell it as such. Things like effective troubleshooting tools makes marketing unhappy because it implies there is something wrong with the product. Thus, it's this unhappy dance between usability and profitability. What makes a good sell? Stuff that looks nice and works well in demos. And really, Windows works 95% of the time for most people. And when it doesn't, Microsoft makes them feel like its their fault, and before enough people get upset about it, they release a new version. Techie nerds like you and me are a slim minority. We're like super-car-mechanics surrounded by people who just want cars to get from A to B, don't care what goes on under the hood, and will buy a new car every few years anyway. Microsoft is the General Motors of the computer world."

This was WAAAY before the GM woes.

I think this also explains why Linux has such a hard time being popular: many Linux geeks assume the user is stupid and often treat them like such. And when someone looks at them and says, "How come I can't run my shiny new game on this weird looking system?" Linux people go mental. Some tell these users they don't really want to play whatever game. The expression is written on their face, and people know that look outside the tech industry as "you just asked an annoying and stupid question." But unlike Microsoft, you won't sell them the latest and greatest.

Azekeil, your problem is the problem of a mechanic who wonders what dolt put a bunch of support bolts so close to the engine firewall that it's impossible to get to them without removing half the air intake system. The car manufacturer doesn't think that anyone will ever need to get to the support bolts. I mean, if you're going to remove the engine, you're voiding the warranty anyway, and then it's not their problem. Microsoft thinks if you don't add an alias "their way," they you're not the customer they are targeting.

I feel your pain. Luckily, Linux is gaining steady ground, however slowly, because in the end, the mechanics are running the garage and the Open Source movement is ONLY answerable to US. But we have to move in the trenches while the Microsoft war machine fires marketing cannons over our heads.
Edited Date: 2010-02-07 05:24 pm (UTC)

Date: 2010-02-07 05:35 pm (UTC)
From: [identity profile] azekeil.livejournal.com
Heh. The irony is, I use Windows (7 now) for my desktop. I play the nice shiny new games. And Microsoft have done a good job, this time. I use Linux for doing useful and interesting stuff; being a server. Every tool has its use. Each tool is better at something than the other tools; some are just inappropriate (e.g. playing a mass-market shiny game).

I'm not so interested in which is better - that's a daft question. It's like saying which is better out of a hammer or a toothpick - it just depends what you want to do.

But I take your point about being a business and marketing. If you want to take that to extremes, just look at Apple. The tantalising underbelly smells like *nix, but it isn't quite. Apple don't stick to the unix philosphy (thanks [livejournal.com profile] hwc) in some important and to me crucial ways.

If I were to get evangelical for a moment, I did actually get excited when Google announced their move into the desktop OS market. On the face of it, I saw it as an opportunity for Linux to get the support and unification I feel it needs in some vital areas - that of end-user experience. However, I've since got less excited, because Google aren't interested in the things they say they're interested in - the OS will be another marketing tool like Microsoft's or Apple's OSes.

And this makes me believe that Linux will have its place when stuff needs to work when placed in the hands of those with enough expertise to use it, but unless the average joe becomes a technical user (which I doubt, somehow) then the business OS will still have shortcomings in the eyes of the technical users.

Date: 2010-02-08 08:32 am (UTC)
From: [identity profile] alexmc.livejournal.com
I think there is a fundamental difference in thought patterns between people who expect there to be a text config file and people who don't.

Date: 2010-02-09 03:47 am (UTC)
From: [identity profile] malcygoff.livejournal.com
so, you didn't just use the GUI for a 5 second job?

Date: 2010-02-10 09:53 pm (UTC)
From: [identity profile] mattcaron.livejournal.com
Because any repetitive task should be scripted. Otherwise, I'd have to manually be crafting packets to test the MAC learning rate of a switch I'm testing, rather than writing a program to do that.

Date: 2010-02-11 01:36 pm (UTC)
From: [identity profile] malcygoff.livejournal.com
From the way that I read it - Alex was just doing one. So, not a repetative task at all!

If it were to be applied to multiple addresses, then the scripting approach (using MS's RUP, LDAP filters, etc) would work.

The engineering problems surrounding switches are different to e-mail servers. I don't see your analogy fitting.

Date: 2010-02-11 03:20 pm (UTC)
From: [identity profile] azekeil.livejournal.com
Heh, well, I kept finding that I wanted to add them ad-hoc, plus I want to enable other users to add aliases too. Plus the host is running on a VM which can take a good 5 mins to get logged in, get the console open, etc etc.

Next time you're round perhaps we can geek a bit if you know better ways of doing this :)

Date: 2010-02-11 11:43 pm (UTC)
From: [identity profile] mattcaron.livejournal.com
The analogy does fit, as both are repetitive.

Also, I did not get that this was a one-off task from the discussion at all.

Finally, when I was a sysadmin, we had a whole pile of things which needed to be done when a new user was created. I couple of perl scripts, daemons in appropriate places, etc. made life a lot easier (especially with all the new students at semester changeover). This easily fits into that mold.

Heh, that's great.

Date: 2010-02-22 10:33 pm (UTC)
From: [identity profile] shlomif.livejournal.com
I spotted this on the Linux community. It's great stuff - thanks for sharing.

March 2014

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Feb. 14th, 2026 01:38 am
Powered by Dreamwidth Studios