Welcome, Guest. Please login or register.

Author Topic: Samba and SMBFS...  (Read 6193 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline flaviosrTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2007
  • Posts: 321
    • Show only replies by flaviosr
    • http://www.facebook.com/flaviosr
Samba and SMBFS...
« on: February 06, 2011, 09:48:44 PM »
Hi to all,
I configured Samba and it's ok! I can ping, the Amiga is seen and the sun is shining... :-)
But when I try to use SMBFS I have some problems:
° I made small scripts to "see" some PCs but only few times these scripts works... most of the times nothing happens and some the computer hangs;
° if I copy these scripts in a CLI shell everything is ok!
ARGH!!! What am I missing?

Another help: is it possible to disconnect a connection? If I stop Miami while a connection is on, the computer hangs most of the times...

Thanx
A500 +A600 +A1000 +A1200 +CDTV
A500 +K3.0 +Viper520CD +
A1200T +K3.1 +Blizzard 603+ (240/50) +
A1200T +K3.1 +Blizzard 1240/40 +
A1200 +K3.1 +Blizzard 1230/50+CoPro +
A2000 +K3.1 +A2630 +
A3000 +K3.1 +Cyberstorm MkIII +
A4000 +K3.1 +A3630 +
A4000T +K3.1 +A3640 +
 

Offline doctorq

  • Hero Member
  • *****
  • Join Date: Aug 2003
  • Posts: 2082
    • Show only replies by doctorq
Re: Samba and SMBFS...
« Reply #1 on: February 06, 2011, 09:56:08 PM »
I'm mounting SMBFS shares fine through scripts, so can you give an example of your script that doesn't work?

FYI, you actually don't need Samba installed for using SMBFS.

As for stopping a share, RTFM. Write Status in CLI to see which process you have to break, and then write Break to break the connection.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Samba and SMBFS...
« Reply #2 on: February 06, 2011, 09:57:51 PM »
smbfs needs stack of at least 32768 bytes.
You can disconnect by sending CTRL-C to smbfs process.
 

Offline flaviosrTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2007
  • Posts: 321
    • Show only replies by flaviosr
    • http://www.facebook.com/flaviosr
Re: Samba and SMBFS...
« Reply #3 on: February 07, 2011, 06:50:14 PM »
Quote from: doctorq;613313
I'm mounting SMBFS shares fine through scripts, so can you give an example of your script that doesn't work?

FYI, you actually don't need Samba installed for using SMBFS.

As for stopping a share, RTFM. Write Status in CLI to see which process you have to break, and then write Break to break the connection.


My script is very easy, changed today to the following line:
RUN SMBFS Volume="name volume" Workgroup=WORKGROUP Service=//computer/directory

I also changed stack to 32768...

Most of the times it hangs and only some it works... :(
First I had also >nil: but without it I can CTLR+C to stop! :)

If I copy the line to a CLI line everything works always (apart my CTRL+C problem... if I close this way the PC hangs...).

Since I am not so good in AmigaOS:
° I created the file with editpad and saved it;
° I opened the info for the file;
° I have the "V" (I do not know the word in English!) for script and removed the one for executable;
° I changed the stack today to 32768;
° Priority 0???
° Have I to executo from Workbench? Now I have this doubt... is it better to run from CLI?
° I change the association from editpad to iconx...

anf, anf, anf...

Where am I wrong?
A500 +A600 +A1000 +A1200 +CDTV
A500 +K3.0 +Viper520CD +
A1200T +K3.1 +Blizzard 603+ (240/50) +
A1200T +K3.1 +Blizzard 1240/40 +
A1200 +K3.1 +Blizzard 1230/50+CoPro +
A2000 +K3.1 +A2630 +
A3000 +K3.1 +Cyberstorm MkIII +
A4000 +K3.1 +A3630 +
A4000T +K3.1 +A3640 +
 

Offline doctorq

  • Hero Member
  • *****
  • Join Date: Aug 2003
  • Posts: 2082
    • Show only replies by doctorq
Re: Samba and SMBFS...
« Reply #4 on: February 07, 2011, 07:16:14 PM »
I can't tell you were you are going wrong, but for me, it works by either starting the script from an icon or starting the script from CLI.

I always use Run >NIL: to start it, as I don't want to have 4 open windows telling me the same thing, for the 4 shares I usually mount. If I really need to disconnect one of the drives, I use the break command instead.

I have the following text in one of my script files.

Run >NIL: C:SMBFS Workgroup=MSHOME User=PCGuest Service=//Desktop/Amiga Device=Amiga_SHARE: volume="Amiga on Desktop"

I use StackAttack, so the stack size is taken care of automatically. I use version 1.66 of SMBFS.
 

Offline Piru

  • \' union select name,pwd--
  • Hero Member
  • *****
  • Join Date: Aug 2002
  • Posts: 6946
    • Show only replies by Piru
    • http://www.iki.fi/sintonen/
Re: Samba and SMBFS...
« Reply #5 on: February 07, 2011, 07:23:30 PM »
Quote from: doctorq;613603
I use StackAttack, so the stack size is taken care of automatically.
You really waste 32k stack for each and every process? Sounds like huge waste to me.
 

Offline doctorq

  • Hero Member
  • *****
  • Join Date: Aug 2003
  • Posts: 2082
    • Show only replies by doctorq
Re: Samba and SMBFS...
« Reply #6 on: February 07, 2011, 07:28:35 PM »
And yet, I still have more than 200 MB free fast ram left, so I can live with it :-)
 

Offline olsen

Re: Samba and SMBFS...
« Reply #7 on: February 07, 2011, 07:33:31 PM »
Quote from: flaviosr;613310
Hi to all,
I configured Samba and it's ok! I can ping, the Amiga is seen and the sun is shining... :-)
But when I try to use SMBFS I have some problems:
° I made small scripts to "see" some PCs but only few times these scripts works... most of the times nothing happens and some the computer hangs;
° if I copy these scripts in a CLI shell everything is ok!
ARGH!!! What am I missing?


Are you sure that everything always works if you launch smbfs manually?

There's a potential issue with name resolution. If you don't have a DNS entry set up for each server you want to connect to, smbfs will fall back to sending broadcast name queries through the network in the hope that the server you want to connect to will respond. This may not always work. In fact, depending upon your TCP/IP stack it may not work at all. The reason why it may not work is because the TCP/IP stack may not be able to send the broadcast query to the right place due to a bug in the old TCP/IP code.

Anyway, a workaround for this name resolution issue is to use the IPv4 address of the server instead of trying its name.

So... the next question would be: how do you launch smbfs if you don't enter the command manually?
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Samba and SMBFS...
« Reply #8 on: February 07, 2011, 08:33:26 PM »
Quote from: Piru;613605
You really waste 32k stack for each and every process? Sounds like huge waste to me.


Quote from: doctorq;613607
And yet, I still have more than 200 MB free fast ram left, so I can live with it :-)


But it's the principle!

--
moto
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline doctorq

  • Hero Member
  • *****
  • Join Date: Aug 2003
  • Posts: 2082
    • Show only replies by doctorq
Re: Samba and SMBFS...
« Reply #9 on: February 07, 2011, 10:25:44 PM »
Quote from: motorollin;613617
But it's the principle!


Again, four chunks of 32k really can't piss me off.
 

Offline Golem!dk

  • Sr. Member
  • ****
  • Join Date: Dec 2002
  • Posts: 414
    • Show only replies by Golem!dk
    • http://www.google.com/
Re: Samba and SMBFS...
« Reply #10 on: February 08, 2011, 02:31:20 PM »
Quote from: doctorq;613665
Again, four chunks of 32k really can't piss me off.


So you only have four active processes at any given time? :)
~
 

Offline pVC

Re: Samba and SMBFS...
« Reply #11 on: February 08, 2011, 02:59:23 PM »
For breaking certain smbfs mount I use this script (launched from dopus startmenu):

status com "smbfs '//remotesystem/share'" > T:smbfs_pid
break ? < T:smbfs_pid >NIL:
Daily MorphOS user and Amiga active.
 

Offline flaviosrTopic starter

  • Sr. Member
  • ****
  • Join Date: Jan 2007
  • Posts: 321
    • Show only replies by flaviosr
    • http://www.facebook.com/flaviosr
Re: Samba and SMBFS...
« Reply #12 on: February 08, 2011, 09:20:59 PM »
Quote from: olsen;613608
Are you sure that everything always works if you launch smbfs manually?

There's a potential issue with name resolution. If you don't have a DNS entry set up for each server you want to connect to, smbfs will fall back to sending broadcast name queries through the network in the hope that the server you want to connect to will respond. This may not always work. In fact, depending upon your TCP/IP stack it may not work at all. The reason why it may not work is because the TCP/IP stack may not be able to send the broadcast query to the right place due to a bug in the old TCP/IP code.

Anyway, a workaround for this name resolution issue is to use the IPv4 address of the server instead of trying its name.

So... the next question would be: how do you launch smbfs if you don't enter the command manually?


Bad news (for me)... I made more tests and SMBFS hangs also when launched from CLI but not so often when lauched with a script!
I tried with IP address instead than name but I had no results!
I tried passing from SMBFS 1.74 to the older 1.66 but again no results.
If I use device and service together the Amiga hangs immediately!!!
When I launch a script nothing happens... but if I open a CLI and try to "enter" the new device I receive a memory error!!! :-o
I am using a standard 18 Mb A4000T, could it be not powerful enough?

Another question: are you using Miami or Genesis?
Which is better?
A500 +A600 +A1000 +A1200 +CDTV
A500 +K3.0 +Viper520CD +
A1200T +K3.1 +Blizzard 603+ (240/50) +
A1200T +K3.1 +Blizzard 1240/40 +
A1200 +K3.1 +Blizzard 1230/50+CoPro +
A2000 +K3.1 +A2630 +
A3000 +K3.1 +Cyberstorm MkIII +
A4000 +K3.1 +A3630 +
A4000T +K3.1 +A3640 +
 

Offline motorollin

  • Hero Member
  • *****
  • Join Date: Nov 2005
  • Posts: 8669
    • Show only replies by motorollin
Re: Samba and SMBFS...
« Reply #13 on: February 09, 2011, 04:09:26 PM »
Quote from: doctorq;613665
Again, four chunks of 32k really can't piss me off.


Clearly text alone is insufficient to communicate sarcasm ;)
Code: [Select]
10  IT\'S THE FINAL COUNTDOWN
20  FOR C = 1 TO 2
30     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NAAAA
40     DA-NA-NAAAA-NAAAA DA-NA-NA-NA-NA-NA-NAAAAA
50  NEXT C
60  NA-NA-NAAAA
70  NA-NA NA-NA-NA-NA-NAAAA NAAA-NAAAAAAAAAAA
80  GOTO 10
 

Offline Daedalus

  • Hero Member
  • *****
  • Join Date: Feb 2002
  • Posts: 893
    • Show only replies by Daedalus
    • http://www.robthenerd.com
Re: Samba and SMBFS...
« Reply #14 on: February 09, 2011, 04:44:40 PM »
Shameless plug here, but you could try my little GUI for SMBFS (Aminet clicky!)... It runs as a commodity, tracks your shares and allows you to mount and dismount them at a click. It doesn't use encryption and passwords are plain to see when you configure it, so it's not for the security-conscious, but it might make things a little easier for you.

I use it all the time and it works great for me, but I use it on OS4 with Roadshow. From my OS3.9 days though, I found that AmiTCP/Genesis to be faster for Samba transfers and general use. Miami of course was much more flexible and so was my only option when connection to some unusual networks.
Engineers do it with precision
--
http://www.robthenerd.com