[Samba] Variable substitution for profile paths in ADUC

Davor Vusir davortvusir at gmail.com
Tue Apr 8 13:23:52 MDT 2014


On 2014-04-02 23:16, samba.20.andwin at spamgourmet.com wrote:
> Many thanks for this hint, I will be able to try this tomorrow!
> As stated above, I'm migrating from an NT4 domain to an AD domain and
> I want to preserve all profiles. The logon path in the old NT4 domain
> was made of the user name and the host names, e.g.
> \\server\profiles\userA.clientB.V2. As a result there exists one
> profile per user *and* per client. To be able to automatically load
> the specific profiles onto the corresponding clients in the new domain
> I need dynamic variable sibstitution. The user name could be static,
> but obviously the client names need to be assigned dynamically.
>
> Best regards
> Andreas
Actually it works. If you put the following in Profile Path: 
\\server\home\%computername%.%username%

root at server:~# ls -al /data/home/
total 152
drwxrwx---+ 18 3000000 root   4096 Apr  8 21:12 .
drwxr-xr-x   6 root    root   4096 Apr  8 15:18 ..
drwxrwx---+  8 r oot    root   4096 Mar 24 12:27 administrator
drwxrwx---+  5 root    root   4096 Apr  7 05:58 davor
drwxrwx---+ 14 3000021 users  4096 Apr  8 21:15 WIN7.tester.V2
root at server:~#

Regards
Davor

> On Wed, Apr 2, 2014 at 10:45 PM, Marc Muehlfeld -
> samba at marc-muehlfeld.de
> <samba.andwin.7dc2ca1a4a.samba#marc-muehlfeld.de at ob.0sg.net> wrote:
>> Hello Andreas,
>>
>> Am 02.04.2014 22:31, schrieb samba.20.andwin at spamgourmet.com:
>>
>>> thanks for your reply. I'm aware of the method you've described.
>>> The question is whether it is possible to dynamically allocate the
>>> profile path on client logon, like it was possible with the Samba
>>> variable substitutions for an NT4 domain. The steps you have described
>>> will statically replace %USERNAME% in the UNC path right after
>>> clicking OK in the corresponding ADUC dialog.
>>
>> You can only assign it through the AD attribute or via GPO:
>> http://www.grouppolicy.biz/2010/03/setting-of-the-week-19-set-roaming-profile-path-for-all-users-logging-onto-this-computer/
>>
>> The smb.conf parameter is just for Samba NT4-style domains.
>>
>> Why do you need the username to stay variable for each account?
>>
>>
>> Regards,
>> Marc
>>



More information about the samba mailing list