smbfs + ? to access a WinXP share
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    Is some other program required for smbfs to work on MorphOS 2.6 ?

    Should this be sufficient to start smbfs?
    Code:
    smbfs workgroup=WORKGROUP User=Guest service=//desktop-pc/all


    Also, does Windows care about capitalisation of the names used in that command line?

    [ Edited by ausPPC on 2010/10/19 8:44 ]
    PPC assembly ain't so bad... ;)
  • »18.10.10 - 20:43
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1049 from 2004/9/23
    The smbfs binary should be enough to connect, but somehow it reacts strange. I am using a script which is not working on all system, even if the same smbfs version and the same OS version is used

    run <>NIL: smbfs workgroup=MSHEIMNETZ device=smb1 service=//192.168.0.10/SharedDocs/ volume=ASharedDocs

    Thats what I use to connect to a XP system.

    Geit
  • »18.10.10 - 20:55
    Profile
  • Order of the Butterfly
    Order of the Butterfly
    Divinity
    Posts: 498 from 2009/9/8
    @ausPPC

    I use this one:

    smbfs cache=500 volume=srvwork Workgroup=LOGDOM User=pmg4 Password=yourpassword Service=//srvuni4/lavori


    note1: I have add in MorphOS hosts the hostname name to address IP (so srvuni4=192.168.0.1 for exemple)
    You can verify the hostname in shell if input "ping srvuni4" so you' ll see resolved in 192.168.0.1 for exemple.

    note2: I use an account, for exemple pmg4/yourpassword in the file server (so no guest access)

    [ Edited by Divinity on 2010/10/18 23:42 ]
  • »18.10.10 - 21:39
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    Thanks for the replies. It's still not working for me though. I found that I could ping MorphOS from the Windows command line but Windows doesn't respond to a ping from MorphOS.

    Not sure if this is significant - I noticed that Windows reported sending 32 bytes of data with each ping while MorphOS reported sending 56. Also, I was able to ping my router/modem from MorphOS.
    PPC assembly ain't so bad... ;)
  • »19.10.10 - 01:02
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 423 from 2005/4/9
    From: magyarorszag/h...
    can someone tell me what needs to be done on the windows side to share a dir (or a partition) what can be accessed with smbfs?

    so far i've set to share a partition in win7 (it tells me its network name is "\\Corepc\h") but cant access it with morphos using this command:

    run <>nil: smbfs workgroup AMIGALAND user core devicename smb1 volumename corepc //Corepc/h OMITHIDDEN <NIL:

    nor this (which is the same basicly:)

    run <>NIL: smbfs workgroup=AMIGALAND device=smb1 user=core service=//Corepc/h/ volume=corepc


    (password is missing as i dont use password for my win system)
    after executing the command the "corepc" volume appears in device list but cant open it and in shell it gives "object is in use" error on trying to access "smb1:". if i run w/o >nil: it start with this message:

    ?Connected '//Corepc/h/' to 'corepch:'; "Break 2" or [Ctrl-C] to stop...

    if i use the ip address instead of hostname it doesnt do anything..
    ping the pc from morphos works and vice-versa as well.

    what do i wrong?:)

    edit: ok got it working. i had to re-enable the guest account in win7 then add this user to the list of enabled users for the partition in properties/security and properties/sharing/advanced sharing - and that was all:)
    what a pain... why cant this be working with the default user (administrator)?
    anyway, is there a way to add more partitons/dirs at once for the same user in the same share?

    [ Edited by sadddam on 2010/10/19 8:33 ]
    DEAD pegII/G4@1000.1gb ram.radeon 9200pro
    240 gigz hd.nec dvdrw.MorphOS 2.4 DEAD
    -=-=-=-
    amiga1200T.blizzardppc@180/040@25.96megz ram
    -=-=-=-=-
    zx.spectrum@3.5
  • »19.10.10 - 01:21
    Profile Visit Website
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    ausPPC wrote:

    I could ping MorphOS from the Windows command line but Windows doesn't respond to a ping from MorphOS.


    Hummm... WindowsXP SP2, with its standard firewall has the nasty habit of NOT replying to ICMP packets (what you send with PING). So review your firewall settings.

    Quote:

    saddam wrote:

    can someone tell me what needs to be done on the windows side to share a dir


    The console command "NET HELP SHARE" will reveal you some interesting things, if you are curious.

    Quote:

    i've set to share a partition but cant access it with morphos using this command:

    run <>nil: smbfs workgroup AMIGALAND user core devicename smb1 volumename corepc //Corepc/h OMITHIDDEN <NIL:


    A full partition? Wow... The only thing you must do is realize about identities. Check permissions in things you are sharing. Rule of thumb is that you should use an identity that the server (Windows, in this case) knows about. I see that "user core" in your SMBFS instance, who is "core"? It must be an specific user in your server, and you have to give permissions to it too.

    Realize that, perhaps, you have to fully qualify the user, saying "corepc\core" for instance. That will make perfectly clear that you are referring to the "core" user of "corepc", the very computer serving through SMBFS/CIFS. Also, does that "amigaland" workgroup exist?

    There's one final thing many people don't realize, and it's that the resource you are sharing (be it a directory, a printer, or whatever) also has its own permissions. By default, Windows puts read only permission over new shares, which effectively deny any write command over its contents, no matter if you have change permissions in its contents.

    If SMBFS client on MorphOS is right, it's all a matter of misunderstanding in the server side. For example, I saw you had to enable the "guest" account, which is ugly. That means SMBFS client doesn't actually use the identity you choose, and reverts to guest credentials? Or perhaps Windows rejects that "core" user you chose, but does you the favour or reverting to guest...

    Windows is very easy to use, but serious things like resource sharing are more demanding.
  • »19.10.10 - 07:12
    Profile
  • Caterpillar
    Caterpillar
    amigagr
    Posts: 35 from 2008/2/11
    From: Thessaloniki G...
    set windows firewall to ''on'' and check the ''file and printer sharing''
    use password on your windows account and if you can, add the win-pc ip to the hosts file of morphos in Prefs/Env_Archive/sys/net
    A3040/25 AmigaOS 3.9
    A1260BPPC AmigaOS 3.9/4.0
    Sam440ep AmigaOS 4.1.2
    PegasosII/G3 AmigaOS 4.1.2/Morphos 2.6/DEBIAN 5.0.4/SUSE 11.1
    MacMini/1.5 MorphOS 2.6/OSX 10.5.8

    If i am going to have bugs on my system,
    at least let me keep the latest version
  • »19.10.10 - 12:08
    Profile Visit Website
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    It works! Thanks again for the replies. After changing Windows tcp/ip, filewall and folder sharing settings the pc started responding to pings from MorphOS and now gives me read/write access to the shared folder. Next thing to do is make sure it can handle large files without corrupting them...
    PPC assembly ain't so bad... ;)
  • »19.10.10 - 22:21
    Profile Visit Website
  • Order of the Butterfly
    Order of the Butterfly
    Posts: 423 from 2005/4/9
    From: magyarorszag/h...
    @jcmarcos
    thx for the reply!
    changing the user to corepc/core helped, i could get rid of the unwanted guest account.

    edit: ok it didnt:) it seems with corepc/core it reverting to the guest account as it stopped working after i removed permissions for guest. but fortunately it seems that the guest user account doesnt have to be enabled, only setting the permissions for it is needed. (thats what i've done again and it works again).

    core is the only one user in my win7 system, just renamed "home" (the default), (i usually dont play with users in windows as i need only one (one thing which for i dislike linux). also dont want to choose between silly pics or type passwords at startup.) but windows itself cant find the user "core" at least i cant add it to the list of users with permissions as i can with the guest user.
    the amigaland usergroup exists, i renamed the default "workgroup" one.

    still i do have some problems:
    for a lot of files on my smbfs share morphos cant see the filetype, not even after i copy it to morphos (ram or hd).
    (filetypes of txt (not all), mp3, 3gp files are recognized, all others are not. oh and it recognized a haiku anyboot image as iso:)
    not only in ambient but fe. mplayer also doesnt play the file, or cant uncompress a zip archive in shell after copied into morphos.

    playing them directly from the share works but if i copy them they dont anymore
    also playing them from share only works if i d'n'd the file to mplayer or load it via asl, doubleclik doesnt work there either.

    saving to the share seems to work, at least i could download a file from owb to the share, havent checked yet that its usable in win or not.

    any suggestions?:) thx!

    [ Edited by sadddam on 2010/10/20 4:56 ]

    [ Edited by sadddam on 2010/10/20 4:56 ]

    [ Edited by sadddam on 2010/10/20 4:57 ]
    DEAD pegII/G4@1000.1gb ram.radeon 9200pro
    240 gigz hd.nec dvdrw.MorphOS 2.4 DEAD
    -=-=-=-
    amiga1200T.blizzardppc@180/040@25.96megz ram
    -=-=-=-=-
    zx.spectrum@3.5
  • »20.10.10 - 01:39
    Profile Visit Website
  • Cocoon
    Cocoon
    jalla
    Posts: 57 from 2004/10/4
    From: Norway
    @sadddam:
    Quote:

    run <>NIL: smbfs workgroup=AMIGALAND device=smb1 user=core service=//Corepc/h/ volume=corepc

    Do you have a Workgroup called Amigaland on your pc ?
    If not, you must change that label to an existing one or create it on the pc side..

    Same thing about the user name. It must exist on the pc.
    If it still does not work, check the firewall rules of windows.

    Is your pc's hostname (corepc) in your hosts list, so MorphOS knows the IP address of it ?
    ------------------------------------------------------
    Pegasos II/G4/512MB/Radeon9200
    ------------------------------------------------------
  • »20.10.10 - 03:46
    Profile
  • Paladin of the Pegasos
    Paladin of the Pegasos
    jcmarcos
    Posts: 1178 from 2003/3/13
    From: Pinto, Madrid ...
    Quote:

    sadddam wrote:

    @jcmarcos
    thx for the reply!


    You're welcome. But I'd me happier if you could have a clean scenario, and it seems not. I'm not saying that it doesn't work, only that it's not "proper".

    Quote:

    it seems with corepc/core it reverting to the guest account as it stopped working after i removed permissions for guest.


    Good way to check: It seems the SMBFS client in MorphOS, albeit allowing you to choose a certain user, doesn't use it at all, and thus reverts to the guest account. But I don't think MorphOS software is that crude.

    OR... Perhaps that Windows has a newer resource sharing service, which negotiates users in a different way, that the SMBFS client in MorphOS doesn't understand. But hey, Microsoft is nice, and instead of completely failing, it reverts to the guest account... Which, as it exists, it must be because of something, don't you think?

    Quote:

    it seems that the guest user account doesnt have to be enabled, only setting the permissions for it is needed.


    Realize that, in a Windows network (which MorphOS attempts to be, partially), if I disable a user, all its accesses to the network are denied immediately, and not only login into the computer. Funny you can use a disabled identity on that server.

    Quote:

    core is the only one user in my win7 system, just renamed "home" (the default),


    Then, "core" is NOT the user. Open a console in Windows ("Start menu, Run, CMD, Accept"), ant type this:

    Code:
    NET USER core


    And then:

    Code:
    NET USER home


    Which one returns information? Also, you might be tempted to use the "administrator" user. Many people do, as it allows for a quick and dirty way of getting through everything. As far as I know, it's impossible for Windows NOT to have an "administrator" account, and it usually has all a man can desire...

    Quote:

    i usually dont play with users in windows


    But you must now: You are in the role of a server administrator! Yes, that's life. Microsoft made resource sharing as easy as they could, but it's not something to be done unconsciously (which many people do, and with success).

    Quote:

    as i need only one (one thing which for i dislike linux).


    You can't imagine just how many people think like you. That great invention, the concept of user account, is something that, in real life, everyone hates. Well, many people don't... becuase they're so dumb they don't even realize user accounts exist: They say "the password of the computer", go figure...

    Quote:

    also dont want to choose between silly pics


    Granted. But there's a reason why Microsoft added the "silly pic" login. Want to know?

    Quote:

    or type passwords at startup.


    You don't just "type a password", you submit a user name, and a password. But I agree, everyone in the world igonres the user concept.

    That computer is multiuser, you can't choose. There's no such concept of using it without being somebody exactly. Well, there's "autologin" feature, a both horrid and lovable thing that Windows has since NT. If you use it, you deserve hell, of course.

    Quote:

    windows itself cant find the user "core" at least i cant add it to the list of users with permissions as i can with the guest user.


    Then that's not normal, or it's froof that "core" is NOT a user name. Please, execute that plain "NET USER" console command I told you in my previous message, to see exactly which users your Windows computer has.

    Quote:

    the amigaland usergroup exists, i renamed the default "workgroup" one.


    I'd say that's fine. As far as I know, Windows workgroups are mere conventions, plain names. You can freely choose any name and, if someone else uses the same, bang, they are considered "together". A Windows domain is another, much, much more complicated (and better) thing.

    Quote:

    for a lot of files on my smbfs share morphos cant see the filetype, not even after i copy it to morphos (ram or hd).
    (filetypes of txt (not all), mp3, 3gp files are recognized, all others are not.


    I'd bet it's just thar MorphOS can't read those files.

    MorphOS uses a more complex, clever way of telling what a file is: Instead of believing the filenames extension (which universally works, but is pityful) it sometimes opens the file and reads a bit out of it.

    Perhaps it's just that, due to permissions, it can't open some files. Have you checked their permissions individually? You can also safely wipe all their permissions, if you have a mixed bag, and just want the same for all.

    Quote:

    cant uncompress a zip archive in shell after copied into morphos.


    If you don't have permissions, you can't read it. But... if you copy the file to a filesystem that doesn't have the concept of permissions (for example, the ubiquitous FAT pendrive), would you expect it's magically readable by the whole universe? What a joke for security.

    But, of course, in order to copy the file, you would have needed permissions to read it. So I think this problem should not be permission related. Perhaps the SMBFS client doesn't alweys read files right?

    Quote:

    playing them directly from the share works but if i copy them they dont anymore


    Wow. Puzzled now. MorphOS experts, what's different among reading a file and making a copy out of it into another filesystem? Both cases include reading, but there's something else in the second, I'd say.

    Quote:

    playing them from share only works if i d'n'd the file to mplayer or load it via asl, doubleclik doesnt work there either.


    Obvoiously, it's just ambient's filetype recognition not working.

    Quote:

    saving to the share seems to work, at least i could download a file from owb to the share,


    Oh. Then, the more difficult task of writing indeed works...

    Quote:

    havent checked yet that its usable in win or not.


    Please do, and tell. But perhaps we need the father of MorphOS' SMBFS client here.
  • »20.10.10 - 07:54
    Profile
  • Caterpillar
    Caterpillar
    amigagr
    Posts: 35 from 2008/2/11
    From: Thessaloniki G...
    @sadddam:

    using os4.1 i found that when i'm copying files from windows 7 the files getting some kb larger than the original size and of course the files going corrupted. this don't happening with windows xp.
    A3040/25 AmigaOS 3.9
    A1260BPPC AmigaOS 3.9/4.0
    Sam440ep AmigaOS 4.1.2
    PegasosII/G3 AmigaOS 4.1.2/Morphos 2.6/DEBIAN 5.0.4/SUSE 11.1
    MacMini/1.5 MorphOS 2.6/OSX 10.5.8

    If i am going to have bugs on my system,
    at least let me keep the latest version
  • »20.10.10 - 17:37
    Profile Visit Website
  • MorphOS Developer
    geit
    Posts: 1049 from 2004/9/23
    Just for those of you (and to remind me) a small hint how to mount samba shares in Windows XP..

    Windows XP:

    First go to windows setup and check "Ordneroptionen" ("drawer options"). Go to the "Ansicht" ("View") tab and search for a checkmark named "Einfache Dateifreigabe..." (simple share..."), this one needs to be enabled.

    Right click on the drawer and select the "Freigabe und Sicherheit" ("share and something") item.

    If this is the first share, then there are only a few link texts visible in the middle of the window. There is an "Ich brauche keinen Assitenten" ("I dont need an assistent"), text. Click that one and it opens a window. Again choose no and activate options.

    Now the window changes for this and any further share. Set the checkmarks (second only if you allow others to modify data) and enter a share name if the drawer name is not a good share name. Press ok and done.

    For more shares just repeat and with right click on those drawers

    MorphOS:

    smbfs workgroup=MSHEIMNETZ device=smb1 service=//192.168.0.111/SharedDocs/ volume=PSharedDocs

    Geit

    [ Edited by geit on 2010/10/28 14:28 ]
  • »28.10.10 - 11:03
    Profile
  • Priest of the Order of the Butterfly
    Priest of the Order of the Butterfly
    ausPPC
    Posts: 543 from 2007/8/6
    From: Pending...
    After first getting it work with static ip addresses, I did some more experimentation & got some networking help from a friend - I now have smbfs and internet sharing from XP.
    PPC assembly ain't so bad... ;)
  • »28.10.10 - 11:48
    Profile Visit Website