[Samba] smb.conf variable expansion

Nicki Messerschmidt, Linksystem Muenchen GmbH samba at alienn.net
Wed May 21 09:15:53 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi List,
with samba 2.2.3a-12 (debian stable release) I had the problem that
following was not possible, because the variable %u was not expanded at
the right time:

In the following example I would like to have a directory structure
with /home/samba/<username>/(profile|samba), this would make it
possible to create this dir via /etc/skel and pam_mkhomedir, but the
last time I tested this it was not working, because samba searched for
"\\brain\%U\profile" as the profile dir with %U not expanded. This was
my smb.conf:
- --- not working smb.conf ---
[global]
  logon drive = U:
  logon home = "\\brain\%U"
  logon path = \\brain\%U\profile


[homes]
  path=/home/samba/%u/samba
  browsable = no
  read only = no
  create mask = 0700
  directory mask = 0700

# I also tried
# [profile]
#   comment = Pofile of user
#   path = /home/samba/%U/profile
#   guest ok = no
#   writable = yes
#   browseable = no
- --- end of not working smb.conf ---

Now I use a directory structure, where the homedir lies at
/home/samba/<username> and the profile is at
/home/samba/profile/<username>, but this cannot easily be created by
pam_mkhomedir. This is my smb.conf at the moment:
- --- working smb.conf ---
[global]
  logon drive = U:
  logon home = "\\brain\%U"
  logon path = "\\brain\profile\%u"

[profile]
  comment = Pofile of user
  path = /home/samba/profile
  guest ok = no
  writable = yes
  browseable = no

[homes]
  path=/home/samba/%u/samba
  browsable = no
  read only = no
  create mask = 0700
  directory mask = 0700
- --- end of working smb.conf ---

And before I try to reconfigure everythin I want to know if anyone has
a solution to achieve something like the first example I so miserably
failed to implement...


Thanks and Cheers
Nicki

- -- 
Linksystem Muenchen GmbH                          info at link-m.de
Schloerstrasse 10                           http://www.link-m.de
80634 Muenchen                              Tel. 089 / 890 518-0
We make the Net work.                       Fax 089 / 890 518-77

-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 6.5.3 for non-commercial use <http://www.pgp.com>
Comment: Keys at: https://www.link-m.de/pgp

iQA/AwUBPss1ues1nPm17iBDEQKU5gCgg3zY+L7an2U2l7Q0NFJdbxns+VkAoP8u
55zoeMzmxGG/qZXpLKhQEe7h
=8Fx5
-----END PGP SIGNATURE-----




More information about the samba mailing list