Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

A workaround solution for WebDAV with XP users UNIX
There was a great thread on using WebDAV to provide iCal (and other) services without dotMac [robg adds: this hint, maybe?]. But it turns out Windows XP behaves strangely when trying to access the DAV service -- it prefixes usernames with " domain_name\ " . There's a somewhat complex and unreliable fix available, but I think the more obvious if somewhat kludgy fix is to just let XP have its way.

Use htpasswd to create extra instances of your users in the .htpasswd file used to provide access to the DAV directory. As in other hints, use this command to add users to the .htpasswd file:
htpasswd -m username /path/to/.htpasswd
Then run the command again, prefixing the username:
htpasswd -m "domain_name\username" /path/to/.htpasswd
So, if my computer is example.com, my user is bill, and the password file is in /Library/WebServer/Documents/dav/.htpasswd, I'll run these two commands, entering the same password for each:
htpasswd -m bill /Library/WebServer/Documents/dav/.htpasswd
htpasswd -m "example.com\bill" /Library/WebServer/Documents/dav/.htpasswd
Make sure you run this command on the correct file -- you may have more than one .htpasswd on your server, or you may have used another name entirely. The -m uses a better encryption scheme; it's optional. In the second version, I used double quotes because I wasn't sure what the backslash would do; maybe they aren't necessary.
    •    
  • Currently 1.00 / 5
  • 1
  • 2
  • 3
  • 4
  • 5
  (1 vote cast)
 
[12,142 views]  

A workaround solution for WebDAV with XP users | 6 comments | Create New Account
Click here to return to the 'A workaround solution for WebDAV with XP users' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
A workaround solution for WebDAV with XP users
Authored by: aixccapt99 on Jun 10, '04 12:12:13PM

Two notes about .htpasswd files:

1) You have to use the -c option ("create") to the htpasswd command the first time you add passwords to a particular file. Don't use it after the first time; it will wipe out the file and overwrite it.

2) The best location for your .htpasswd files is OUTSIDE the web-accessible area, for security reasons. Apache does have a pre-configured filter that should block access (only if you name them .htpasswd), but why not be extra-safe? Create the directory /Library/WebServer/htpasswords/ (which is not web-accessible by default) and create as many files you want in there. You could have different files for different sections of your site -- they don't have to be named .htaccess. Just specify the file you want to use when you set up the AuthFile directive.



[ Reply to This | # ]
A workaround solution for WebDAV with XP users
Authored by: ploute on Jun 10, '04 02:56:56PM
Are you sure you don't need to double the anti-slash (for the domain separator) ? I guess if you type
htpasswd -m "pseudomain\tom" /path/to/.htpasswd
, you will get a tab because that is the code for "antislash-t". I think instead you should type
htpasswd -m "domain_name\\username" /path/to/.htpasswd
Cool tip anyway, thanks ;)

[ Reply to This | # ]
A workaround solution for WebDAV with XP users
Authored by: ar on Jun 10, '04 06:12:11PM
Another, possibly simpler workaround on the XP side is to update to the latest release of MDAC. (Yes Microsoft's WebDAV client is combined with the Data Access Components suite)

Updating to the latest MDAC prevents XP from including the "DOMAIN\" portion in the username.

[ Reply to This | # ]

A workaround solution for WebDAV with XP users
Authored by: alani on Jun 14, '04 09:48:12AM

Ah, thanks! I was looking hard for some kind of update or fix. This will definitely help.

But only me. Do you think any of the Windows users I work with are going to be bothered with this if it's not being downloaded and installed automatically for them? Darn it.

Looks like MS isn't getting behind WebDAV, if this is how they are going about enabling the OS with a functional client.

Makes me think that for good reasons or bad WebDAV is a dead end technology. One good reason may be security.

I'm running a SSL server, but telling the client to use https instead of http doesn't work. I haven't stumbled on any articles about this.



[ Reply to This | # ]
A workaround solution for WebDAV with XP users
Authored by: mieses on Sep 27, '04 03:44:57PM

Updating MDAC did not work for me.

The mod_encoding and htpasswd fixes both work.



[ Reply to This | # ]
A workaround solution for WebDAV with XP users
Authored by: iOliver on Jun 13, '04 05:30:42PM
There is also this article on enabling WebDav on Mac OS X.

[ Reply to This | # ]