Jump to content

Mapping windows shares %username% equivalent


Recommended Posts

Posted

I have been able to get workgroup manager to add a drive mapping on the desktop for the general user share eg. \\someserver\usershares$. But I want to be able to add the home directory of that user eg

\\someserver\usershares$\%username%.

 

Is there a %Username% equivalent on mac osx ? If not has anyone got a simple script that will map a windows share using the current user’s username?

 

Also I am using admit Mac which is meant to be able to cope with user home folders being on a dfs, the problem is we don’t use the home folder information (as this is done with my doc`s redirection) and so admit Mac can’t map it, any ideas ?

Posted
I wish you luck with this, closest i got a few months ago was to get all home folders listed but only alow access to the user logged on to its folder. E.g. user had to trawl through all home directories to get to there own.
Posted

Ok try these few things.

 

Add your Mac OSX server to Active directory with directory access in utilities.

 

When you add one of the mac workstations to AD with directory access make sure you untick the "force local home directory"

 

Also the last extreme thing is by making sure all directorys before the users areas has "read only" access. That took me a long time to figure out.

 

Ross

Posted

Hi,

 

I have been experimenting with getting user folders to map onto the desktop. As far as I can tell Mac OSX is unable to map subdirectories of a share directly. I think this is because the mount command is not capable of mapping subdirectory.

 

So to get round this I have been attempting to mount the share all users are stored on then using :

 

mkdir /Volumes/Users

mount -t cifs //Server/Users$ /Volumes/Users

 

Then getting the users name using

 

id -u -n | read -d @ Username

(This gets the users username delimited by the “@” sign)

 

Then create a symbolic link from the user share to the individual user’s home folder

 

ln -s /Volumes/Users/$Username/ /Domain/cvs.lan/users/$Username/Desktop/MyDocuments

 

Full version:

 

#!/bin/bash

mkdir /Volumes/Users

mount -t cifs //Server/Users$ /Volumes/Users

id -u -n | read -d @ Username

ln -s /Volumes/Users/$Username/ /Domain/cvs.lan/users/$Username/Desktop/MyDocuments

 

This unfortunately does not seem to work correctly . Any suggestions would be much appreciated.

 

Thanks

 

Andy

Posted

I don't know if this will work for you but i needed to mount a share for all machines and not know ing much about unix scripting i resorted to applescript.

 

tell application "Finder"

open location "afp://;AUTH=Client%20Krb%20v2@server/share"

end tell

 

The above mounts the share using kerberos authentication. Whether this helps i dunno but there you go. I used automator to run it but you should be able to run it at login surely.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...