Hi all,
I have a login hook that i use that was written by Nigel Kirsten. The issue is that I can’t seem to get it to work properly at a site where the Windows AD shares for their home folders look as follows: TSC Teachers$ The share is hidden
Now if I hard code the path on the login hook, the user(s) can log in. The problem is that there are a number of different buildings that log into different home dir servers.
I am wondering if there is a way to parse the returns of this dscl command with sed from:
home_loc=$(dscl /Search -read /Users/$1 homeDirectory | sed ‘s|homeDirectory: ||g’) and have the output change from
[b]\\MSO-Server01\TSC Teachers$[/b]
to something like:
[b]\\MSO-Server01\TSC\ Teachers\$/[/b]
NOTE: It should look like: forward slash, forward slash. MSO-Server01, forward slash, TSC, forward slash, space, Teachers, back slash, dollar sign, forward slash
I think this is where the problem is occuring. If I try and use the full path to the home dir, then it works fine, however that isn’t a great solution.
I have trid:
home_loc=$1 –> no go
home_loc=~$1 –> no go
I have tried home_loc in brackets: “$home_loc” –> no go
All help is appreciated
Thanks
Comments are closed