[Geek] F%^&ing Windows!
Feb. 7th, 2010 11:49 amContrast and compare:
Programmatically adding an email alias on Linux:
echo newalias: mylinuxaccount>> /etc/aliases
Programmatically adding an email alias to Exchange on Windows:
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.
Programmatically adding an email alias on Linux:
echo newalias: mylinuxaccount>> /etc/aliases
Programmatically adding an email alias to Exchange on Windows:
- Realise there's no simple file to edit. Figure out how to do it using Windows Powershell.
- 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.
- 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!
- 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.
- 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.
- Log in remotely and write commands to batch file.
- 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.
- 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.
- 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.
no subject
Date: 2010-02-07 12:04 pm (UTC)But I accept that there's still a disparity...
no subject
Date: 2010-02-07 12:20 pm (UTC)- Look up how to add a new alias. Oh, it's just a file.
- 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.no subject
Date: 2010-02-07 12:28 pm (UTC)no subject
Date: 2010-02-07 12:35 pm (UTC)no subject
Date: 2010-02-07 12:47 pm (UTC)http://msdn.microsoft.com/en-us/exchange/default.aspx
:)
no subject
Date: 2010-02-07 01:23 pm (UTC)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.
no subject
Date: 2010-02-07 01:49 pm (UTC)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?
no subject
Date: 2010-02-07 02:51 pm (UTC)no subject
Date: 2010-02-07 03:02 pm (UTC)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.
no subject
Date: 2010-02-07 04:55 pm (UTC)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.
no subject
Date: 2010-02-07 03:12 pm (UTC)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.
no subject
Date: 2010-02-07 05:08 pm (UTC)no subject
Date: 2010-02-07 04:40 pm (UTC)no subject
Date: 2010-02-07 05:08 pm (UTC)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:
no subject
Date: 2010-02-07 05:17 pm (UTC)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.
no subject
Date: 2010-02-07 05:35 pm (UTC)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
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.
no subject
Date: 2010-02-08 08:32 am (UTC)no subject
Date: 2010-02-09 03:47 am (UTC)no subject
Date: 2010-02-10 09:53 pm (UTC)no subject
Date: 2010-02-11 01:36 pm (UTC)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.
no subject
Date: 2010-02-11 03:20 pm (UTC)Next time you're round perhaps we can geek a bit if you know better ways of doing this :)
no subject
Date: 2010-02-11 11:43 pm (UTC)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)