[Samba] map user homes to a windows share

Michael Heydon michaelh at jaswin.com.au
Thu Nov 8 23:28:46 GMT 2007



Elvar wrote:
> My problem is that I need to figure out how to have each user's home 
> folder on the Ubuntu boxes map to the users home folder on the windows 
> 2003 server. The share location of their home folders on the windows 
> 2003 server is something like \\servername\docs$\students\%username%. 
> I'm not even sure if I can map to a hidden share "$" in samba and also 
> specify the %username% variable.
The simplest solution would be to simply mount \\servername\docs$ or 
possibly \\servername\docs$\students\ (From memory, you can't mount a 
directory under linux, only a share). You could then setup symlinks or 
change the home directory for the users. This would be much simpler than 
having a seperate mount for every user.

If you really want to do it your way, it may be possible using a mixture 
of sudo, backticks (`) and the whoami command. I really don't see any 
benefit though.

-- Michael


More information about the samba mailing list