[Fwd: simple question?]

[Fwd: simple question?]

Post by Friedrich Dominicu » Sun, 01 Mar 1998 04:00:00



[ Attached Message ]

From:
To:
Date: Thu, 26 Feb 1998 08:28:33 +0100
Local: Thurs, Feb 26 1998 2:28 am
Subject: Re: simple question?
Lalit Jairath schrieb:

> i want to make a shell script that would log me on to an anonymous
> site
> and ftp a file from dir /pub/log to my cwd and quit from there.

> i use following but it doesn't work:

> #!/bin/sh
> ftp 131.104.112.4
> anonymous

> cd /pub/log
> get README
> quit

Use expect, I don't think you can do this kind of stuff just with
shell-skripts.Perl and other scripting languages will probably help too

Here's a small perl-script
#!/usr/bin/perl -w

use Net::FTP

$hostname='131.104.112.4';
$user='anonymous';

$ftp_path='/pub/log';
$file_to_get='README';

# new object
$ftp=Net::Ftp->new($hostname);
# ftp login
$ftp->login($user, $password);

# change directory
$ftp->cwd($ftp_path);

# get the file
$ftp->get($file_to_get);

#quit the session
$ftp->quit;

I'm not quite sure if this really works, but a simular programm should
do.

Best regards
Friedrich

 
 
 

1. A simple Samba/YP share question.. (fwd)

Hello All,

I'm a samba novice ;(

Saw your "detailed" responses to another newbie questions so I thought I
give you a shout :)

Here is my setup:

I've got 2 Linux boxes.  One is running Ypserv and handles the
authentication, the other is  a 486  33mhz running ypbind(slave) and it
is my printserver.  The print server is also running the latest samba
release as a daemon (smbd -D).

It has two printers attached via parallel ports and each is shared
service..  I know this b/c when I do *smbclient -L "myhostname"* , they
come up as shared clients.

So each authenticated user can actually mount their " \" directory..
They don't actually have accts on the printserver(don't have the disk
space).

I've got 10 NT 4.0 boxes which need to print to these shared printers..

However, printing only occurs when I "physically" mount the home
directory via "\\hostname\home_dir".

I want samba to offer the network printers as a share device to each
authenticated user automatically.

Should be transparent to the user..

How do I do this?

Thanks in advance..

--
Alfred
________________________________________________

 FAMU-FSU COE ASME Webmaster
 http://www.eng.fsu.edu/~green


_________________________________________________

2. NEC Ready 4/66 and XF86

3. A simple question deserving a simple answer

4. recovering after a SEGV

5. a simple sed question ( there all simple :> )

6. packet writing...

7. Simple question from simple user

8. Cluster hardware: comments, recommendations, criticisms

9. Simple FTP question (very simple)

10. simple question about simple code

11. Simple question for us simple minded.

12. Simple question - simple answer?

13. Fwd: Simple IP-Forwarding problem