[Samba] Q: Automount client's shares to Samba PDC?

13-Jules 13-Jules at gmx.net
Wed May 21 18:29:40 GMT 2003


hello NG,

my config:
- SuSe 8.1 box with Samba (2.2.5 running as PDC) and a FTP server.
- Windows XP and 2k clients with shared directories

my problem:
i want that the shares of the Windows- clients to get mounted automatically
while booting to a mountpoint of the Linux- box (the FTP- directory)

until now, i have tried to solve this problem like this:
i have added the commands preexec and postexec to the share [homes]:

------------------------------------------------
[homes]
        comment = Home Directories
        valid users = %S
        browseable = no
        writeable = yes
        create mask = 0640
        directory mask = 0750
        root preexec = /etc/samba/smbpreexec
#      root postexec = /etc/samba/smbpostexec
------------------------------------------------

with other words: as soon as a user logs on the script smbpreexec gets
executed, and as soon as he logs off, smbpostexec gets executed. here are
these two scripts:

smbpreexec:
------------------------------------------------
#!/bin/sh
/var/lib/samba/bin/smbmount //tom/MP3 /home/ftpuser/mp3/lan20 -o
credentials=/etc/samba/password.pw,ro
,debug=4 > /tmp/smblogon1.report
/var/lib/samba/bin/smbmount //tom/Programpool
/home/ftpuser/software/lan20/ -o credentials=/etc/samba/
password.pw,ro,debug=4 > /tmp/smblogon2.report

------------------------------------------------

smbpostexec:
------------------------------------------------
#!/bin/sh
/usr/bin/smbumount /home/ftpuser/mp3/lan20 >/tmp/smblogoff1.report
/usr/bin/smbumount /home/ftpuser/software/lan20 >/tmp/smblogoff2.report

------------------------------------------------

- when i execute these two scripts manually, everything works fine. the
scripts are chmod 777
- when someone logs on, the preexec gets executed, wich i see because the
smblogon1.report gets written. but the shares aren't mounted after that!! i
thougt, that maybe the postexec gets executed in the same moment, so the
unmount happens right away. so i "#" the postexec in the share, but still no
change.

here is the contens of the smblogon1.report:
------------------------------------------------
INFO: Debug class all level = 1   (pid 21363 from pid 21363)
mount.smbfs started (version 2.2.5-SuSE)
added interface ip=127.0.0.1 bcast=127.255.255.255 nmask=255.0.0.0
added interface ip=192.168.0.1 bcast=192.168.0.255 nmask=255.255.255.0
resolve_lmhosts: Attempting lmhosts lookup for name tom<0x20>
getlmhostsent: lmhost entry: 127.0.0.1 localhost
resolve_hosts: Attempting host lookup for name tom<0x20>
Connecting to 192.168.0.20 at port 139
21363: session request ok
21363: session setup failed: SUCCESS - 0
------------------------------------------------

anybody out there, who can help me??

thanx for your time!!
tom.



More information about the samba mailing list