Koozali.org: home of the SME Server

CLI from Win Client

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
CLI from Win Client
« on: March 07, 2004, 06:59:08 PM »
Hi All,

I was wondering - is there any way to get
a Linux script to run from the windows client ?

To explain - I am building a CD server and
will use something like :-

mount -t iso9660 -o loop,ro /mnt/cdrom/imagename.iso /mnt/vcds/imagename

In smb.conf

[cdroms]
comment = "CD Image Created %T"
path = /mnt/vcds
public = yes
writable = no
only guest = yes
browseable = yes

But I want to be able to mount and unmount them
at will - *not* autmagically with autofs or
automount.

So, I need to be able to make a script that will do the mounts but be able to choose which one when required and also unmount when required both from the win client

Thanks in advance for any help

Graham
"If you don't know what you want, you end up with a lot you don't."

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
CLI from Win Client
« Reply #1 on: March 07, 2004, 07:02:05 PM »
I am alos wondering about permissions - who can run the scripts and how to allocate permissions so that anyone on the LAN can do that ?

Thanks
"If you don't know what you want, you end up with a lot you don't."

matsk

CLI from Win Client
« Reply #2 on: March 07, 2004, 09:05:51 PM »
Check :
Plink (a command-line interface to the PuTTY back ends)

http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html

This will give you the possibility to make a batchfile that will launch a ssh session and perform commands on your SME box.

The other question. There is a contrib to set permissions that will allow you to achive what you are asking for, but I don't remember in my head what is was.

/Mats

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
CLI from Win Client
« Reply #3 on: March 08, 2004, 12:39:20 AM »
It seemed from reading the samba docs that the preexec and postexec commands would do what I wanted i.e. mount the cd when required. However it seems as though its permanently mounted and the postexec command isnt being run.

I'll try upping the log level and see what I can find out :)
"If you don't know what you want, you end up with a lot you don't."

Anonymous

CLI from Win Client
« Reply #4 on: March 08, 2004, 01:19:12 AM »
Set debug level = 5 in smb.conf but its not really helping - postexec is still not executing (or doesnt appear to be ?)

Any help / advice appreciated

Offline gbentley

  • *****
  • 482
  • +0/-0
  • Forum Lurker
    • Earth
CLI from Win Client
« Reply #5 on: March 08, 2004, 03:46:11 PM »
The way I read it postexec should run the specified command when disconnecting from the service. However this doesnt seem to be working at all. I am wondering if closing the desktop folder will not send any kind of signal to samba ? I have tried mapping drives then disconnecting mapped drives but that doesnt work either. Anyone else had any luck with this ?

Thanks !
"If you don't know what you want, you end up with a lot you don't."