Some interesting share names
pfaff at edge.cis.mcmaster.ca
Mon Oct 25 02:45:41 GMT 1999
On Mon, 25 Oct 1999, Richard Sharpe wrote:
> The following works:
> Comment = some comment
> path = some path
> Now, I am sure that other macros, like %m, etc, will work there as well.
> I can think of some interesting uses for this, and wondered if anyone else
i use this format to provide per-user NT profile shares within a users
home directory. this neatly avoids the NT quirk whereby a previous users
connection to their profile share is maintained by the NT workstation
after the user logs out, since each user connects to a different share
name. yes, the previous users share may still be connected (ie. if
deadtime has not been exceeded), but this doesn't get in the new users
way and as long as deadtime != 0 it will eventually be disconnected.
the details from smb.conf are included below.
richard, you may be interested in my comments in the [nt-%U] share
section because they sort of relate to your recent notes about types of %
macro substitutions, in particular, the %p macro:
o %p = the path of the service's home directory, obtained
from your NIS auto.map entry. The NIS auto.map entry is
split up as "%N:%p".
which only seems to work in the [homes] share because the NIS map lookup
is keyed on the servicename. it would be nice if %N and %p could be used
in any service, by keying them on the value of %U.
domain logons = yes
logon drive = h:
logon home = \\%N\%U
logon path = \\%N\nt-%U\NTProfile
# NT profile root directory
# We use the user's home directory as the NT profile root directory
# and then the subdirectory NTProfile is created within this root.
# This directory must be writeable by the user because NT tries to
# create the directory ntprofile.pds in this root.
comment = NT profile root directory
# using NIS homemap
# doesn't work because %p is keyed on service name
# need a different variable that is keyed on user name
#path = %p
# not using NIS homemap
path = /home/%U
browseable = no
writeable = yes
preexec = /usr/local/samba/bin/create-profile %U %G %P/NTProfile
Todd Pfaff \ Email: pfaff at mcmaster.ca
Computing and Information Services \ Voice: (905) 525-9140 x22920
ABB 132 \ FAX: (905) 528-3773
McMaster University \
Hamilton, Ontario, Canada L8S 4M1 \
More information about the samba-technical