From the smb.conf help document regarding the "message command" field:->You could make this command send mail, or whatever else takes your fancy. >Please let us know of any really interesting ideas you have.First, my question:- Does Samba do anything in particular with the standard output of the program specified here? What would it take to have it WinPopUp-ed back to the sender of the message? I'm presently working on a program** to enable simple commands of some kind to be WinPopUp-ed to a Linux box and acted on or responded to in some way. For example, rather than having to telnet to my Linux box, log in, enter "ifup ppp0" to dial into my ISP and then something else to activate my masquerading, I think it would be rather nice if I could simply WinPopUp a simple command such as "DIAL_IN" and then get a nice, user-friendly response such as "Your Internet connection is now active" popped back to me upon successful completion. ** Note well at this point:- I'm **NOT** a qualified or experienced programmer in any way, shape or form. In fact, I've only just finished wading through Herb Schildt's "Teach Yourself C" so this project is perhaps an over-ambitious second step up from the "...int main()..., printf("Hello World");" league................. Needless to say, if I actually end up with anything you guys couldn't bash out in five minutes with your eyes closed, I'll be more than happy to contribute it to the Samba project!!! Regards, ------------------ David Andrew Patterson dap68@optusnet.com.au ------------------ "Let me know, heaven sees Shines on life, our memories Make me feel all that you are Angel child or a radiant star" -Chantal Kreviazuk
If you want to run a command on the linux server, why not just use the exec parameter? Are you wanting to send a pop up message to a windows or linux client? Although I don't use it right now, there is a well defined mechanism for sending popup messages to windows clients. Joel On Fri, Jan 10, 2003 at 10:54:49PM +1100, David Andrew Patterson wrote:> > From the smb.conf help document regarding the "message command" field:- > > >You could make this command send mail, or whatever else takes your fancy. > >Please let us know of any really interesting ideas you have. > > First, my question:- Does Samba do anything in particular with the standard > output of the program specified here? What would it take to have it > WinPopUp-ed back to the sender of the message? > > I'm presently working on a program** to enable simple commands of some kind > to be WinPopUp-ed to a Linux box and acted on or responded to in some way. > For example, rather than having to telnet to my Linux box, log in, enter > "ifup ppp0" to dial into my ISP and then something else to activate my > masquerading, I think it would be rather nice if I could simply WinPopUp a > simple command such as "DIAL_IN" and then get a nice, user-friendly > response such as "Your Internet connection is now active" popped back to me > upon successful completion. > > ** Note well at this point:- I'm **NOT** a qualified or experienced > programmer in any way, shape or form. In fact, I've only just finished > wading through Herb Schildt's "Teach Yourself C" so this project is perhaps > an over-ambitious second step up from the "...int main()..., printf("Hello > World");" league................. Needless to say, if I actually end up > with anything you guys couldn't bash out in five minutes with your eyes > closed, I'll be more than happy to contribute it to the Samba project!!! > > Regards, > > ------------------ > David Andrew Patterson > dap68@optusnet.com.au > ------------------ > > > "Let me know, heaven sees > Shines on life, our memories > Make me feel all that you are > Angel child or a radiant star" > -Chantal Kreviazuk > > -- > To unsubscribe from this list go to the following URL and read the > instructions: http://lists.samba.org/mailman/listinfo/samba
On Fri, Jan 10, 2003 at 10:54:49PM +1100, David Andrew Patterson wrote:> First, my question:- Does Samba do anything in particular with the standard > output of the program specified here? What would it take to have it > WinPopUp-ed back to the sender of the message?Have your message command run smbclient to send a winpopup back.> I'm presently working on a program** to enable simple commands of some kind > to be WinPopUp-ed to a Linux box and acted on or responded to in some way. > For example, rather than having to telnet to my Linux box, log in, enter > "ifup ppp0" to dial into my ISP and then something else to activate my > masquerading, I think it would be rather nice if I could simply WinPopUp a > simple command such as "DIAL_IN" and then get a nice, user-friendly > response such as "Your Internet connection is now active" popped back to me > upon successful completion.One problem you're going to face is that the message command gets run as the guest account (defaults to "nobody"). In order to run something like ifup you're going to have to either use a setuid executable (which raises all sorts of potential security issues) or set your guest account to something privileged like root (which raises even bigger security issues). -- Michael Heironimus
man smb.conf Then search for preexec and root preexec and postexec. for example, this should do it: /preexec Press n to repeat the search. This is part of samba. It allows samba to invoke commands when a user logs in or logs out of the share. It is very handy. Joel On Fri, Jan 10, 2003 at 11:35:43PM +1100, David Andrew Patterson wrote:> At 07:28 AM 10/01/03 -0500, you wrote: > >If you want to run a command on the linux server, why not just use the exec > >parameter? > > > >Are you wanting to send a pop up message to a windows or linux client? > >Although I don't use it right now, there is a well defined mechanism for > >sending popup messages to windows clients. > > > >Joel > > Tell me more about this "exec parameter".... (What is it, how do I use it, > etc...) Is it part of Samba, or completely unrelated? > > > > ------------------ > David Andrew Patterson > dap68@optusnet.com.au > ------------------ > > > "Let me know, heaven sees > Shines on life, our memories > Make me feel all that you are > Angel child or a radiant star" > -Chantal Kreviazuk >