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.
Marian Mlcoch, Ing
2003-May-22 05:42 UTC
[Samba] Q: Automount client's shares to Samba PDC?
Hi I dont und. why mixed samba with ftp server but you write ! i want that the ....mounted automatically> while booting but when you add scripts to smb.conf this scripts is executed on use of share not by boot...? And this script not chalenge with ftp login! If this is ok then try change name to ip in script not use \\tom but \\xx.xx.xx.xx... tom ip on mount. If you exact mount on boot write call to script into /etc/rc.local... If you need this to use with ftp then you not need runn samba as PDC run only smbmount... Bye. ----- Original Message ----- From: "13-Jules" <13-Jules@gmx.net> To: <samba@lists.samba.org> Sent: Wednesday, May 21, 2003 8:29 PM Subject: [Samba] Q: Automount client's shares to Samba PDC?> 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 mountedautomatically> 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 stillno> 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. > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba