Fs-cifs examples

Hey,

I’ve been trying to setup mount points to windows shares from QNX 6.2
and I’m having some difficulties using fs-cifs. I’m trying to map to a
windows share that is accessible by “Everyone” and doesn’t have any
authentication setup whatsoever. So if I try to run this command it
doesn’t work:

fs-cifs //Laptop:Radial:/ /Mp3 guest none

I’ve trying various other combinations, like using the administrator
login/password without any luck. If anyone who is using fs-cifs could
post some examples of what they did and if there are any particulars
that need to taken off on the windows side, I would greatly appreciate it.

Thanks,
Eric

I have a script (called mapnt) that does the following (requires that
samba be installed):


ipaddr=$(nmblookup $1 2>&1 | grep $1 | grep -v 255 | cut -f1 -d’ ')
op fs-cifs //$1:$ipaddr:/$2 /nt/$1/$2 $3 $4 &

When I want to map something on the windows network I type:

$ mapnt

The nmblookup utility (part of samba) fills in the ip address for me.

David Gibbs wrote:

Eric Norton <> enortonNOSPAM@nospamfct.ca> > wrote:

Hey,


I’ve been trying to setup mount points to windows shares from QNX 6.2
and I’m having some difficulties using fs-cifs. I’m trying to map to a
windows share that is accessible by “Everyone” and doesn’t have any
authentication setup whatsoever. So if I try to run this command it
doesn’t work:


fs-cifs //Laptop:Radial:/ /Mp3 guest none


My fs-cifs command that I regularly use to mount my laptop’s hard drive
when I’m running it in Windows:

fs-cifs “//Ntw1010dag:10.x.x.x:/dagibbs_c” /fs/laptop dagibbs “passwd” &

Where NTw6746dag is the “name” of my laptop on the windows network, and
10.x.x.x is the IP address.

On the laptop. I found I had to create an alias for my harddrive, in this
case dagibbs_c in order to be able to mount it. I also have to give my
windows laptop/network login & passwd on the fs-cifs command line.

-David

Eric Norton <enortonNOSPAM@nospamfct.ca> wrote:

Hey,

I’ve been trying to setup mount points to windows shares from QNX 6.2
and I’m having some difficulties using fs-cifs. I’m trying to map to a
windows share that is accessible by “Everyone” and doesn’t have any
authentication setup whatsoever. So if I try to run this command it
doesn’t work:

fs-cifs //Laptop:Radial:/ /Mp3 guest none

My fs-cifs command that I regularly use to mount my laptop’s hard drive
when I’m running it in Windows:

fs-cifs “//Ntw1010dag:10.x.x.x:/dagibbs_c” /fs/laptop dagibbs “passwd” &

Where NTw6746dag is the “name” of my laptop on the windows network, and
10.x.x.x is the IP address.

On the laptop. I found I had to create an alias for my harddrive, in this
case dagibbs_c in order to be able to mount it. I also have to give my
windows laptop/network login & passwd on the fs-cifs command line.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

Eric Norton <enortonNOSPAM@nospamfct.ca> wrote:

fs-cifs //Laptop:Radial:/ /Mp3 guest none

You didn’t specify a sharename. It should be something like this:

fs-cifs //Laptop:Radial:/share_name /Mp3

Cheers,
Camz.

David Gibbs <dagibbs@qnx.com> wrote:

On the laptop. I found I had to create an alias for my harddrive, in this
case dagibbs_c in order to be able to mount it. I also have to give my
windows laptop/network login & passwd on the fs-cifs command line.

Windows 2000 and later (and possibly 98) will automatically share all your
drives as C$, D$, etc. These are “special” and can not be disabled, they
typically do not show up in the browsable lists.

Cheers,
Camz.

camz@passageway.com wrote:

David Gibbs <> dagibbs@qnx.com> > wrote:

On the laptop. I found I had to create an alias for my harddrive, in this
case dagibbs_c in order to be able to mount it. I also have to give my
windows laptop/network login & passwd on the fs-cifs command line.


Windows 2000 and later (and possibly 98) will automatically share all your
drives as C$, D$, etc. These are “special” and can not be disabled, they
typically do not show up in the browsable lists.

Is there any way to map to a share that has no login/password set?
Basically, Rennie’s script worked, I just get a password denied problem
now. So I’m just curious about when I’m booted into Windows, I have
access to these same shares that I’m trying to map to now under QNX, but
under Windows I don’t have to authenticate myself. Is this because when
I’m booted into Windows I logon as part of a domain, which is the same
domain that the shares are located on (I.e. The computer that is sharing
is part of the domain)?

–Eric

camz@passageway.com wrote:

Yes. Windows Domains are strange beasts, once you login to the domain your
machine is now trusted by the domain controller. When you try to connect
to a file share on the network, the machine with the share asks if your
machine is trusted and who is logged in to your machine. This is all hidden
from you. So it appears as though you are not using a userid/passwd, when
in reality you are.

Ahhh. That makes sense. So, it appears as though that would limit me to
using a user/pass locally on the machine that is hosting the shares,
unless I’m trusted by the domain controller. If the windows world does
it transparently, how does one do it in the QNX world? This also leads
me to wonder whether I can use my domain user/pass to authenticate
myself with the Windows machine (also part of the domain) from the QNX
world?

I.e. fs-cifs //NB_NAME:10.0.0.1:/QNX_BIN /bin Domain_User Domain_pass

–Eric

Eric Norton <enortonNOSPAM@nospamfct.ca> wrote:

Is there any way to map to a share that has no login/password set?

It should just work, I’d be surprised there there was no login/passwd though

now. So I’m just curious about when I’m booted into Windows, I have
access to these same shares that I’m trying to map to now under QNX, but
under Windows I don’t have to authenticate myself. Is this because when
I’m booted into Windows I logon as part of a domain, which is the same
domain that the shares are located on (I.e. The computer that is sharing
is part of the domain)?

Yes. Windows Domains are strange beasts, once you login to the domain your
machine is now trusted by the domain controller. When you try to connect
to a file share on the network, the machine with the share asks if your
machine is trusted and who is logged in to your machine. This is all hidden
from you. So it appears as though you are not using a userid/passwd, when
in reality you are.

Cheers,
Camz.

Eric Norton <enortonNOSPAM@nospamfct.ca> wrote:

Ahhh. That makes sense. So, it appears as though that would limit me to
using a user/pass locally on the machine that is hosting the shares,
unless I’m trusted by the domain controller.

Correct.

If the windows world does
it transparently, how does one do it in the QNX world? This also leads
me to wonder whether I can use my domain user/pass to authenticate
myself with the Windows machine (also part of the domain) from the QNX
world?

Yes. The machine with the shares doesn’t actually have any userid/passwd
file to check against when in a domain, that is on the domain controller.
So it just passed the userid/passwd to the domain controller to authenticate.

I.e. fs-cifs //NB_NAME:10.0.0.1:/QNX_BIN /bin Domain_User Domain_pass

Correct.


Cheers,
Camz.

Eric Norton <enortonNOSPAM@nospamfct.ca> wrote:

camz@passageway.com > wrote:

Yes. Windows Domains are strange beasts, once you login to the domain your
machine is now trusted by the domain controller. When you try to connect
to a file share on the network, the machine with the share asks if your
machine is trusted and who is logged in to your machine. This is all hidden
from you. So it appears as though you are not using a userid/passwd, when
in reality you are.

Ahhh. That makes sense. So, it appears as though that would limit me to
using a user/pass locally on the machine that is hosting the shares,
unless I’m trusted by the domain controller. If the windows world does
it transparently, how does one do it in the QNX world? This also leads
me to wonder whether I can use my domain user/pass to authenticate
myself with the Windows machine (also part of the domain) from the QNX
world?

I.e. fs-cifs //NB_NAME:10.0.0.1:/QNX_BIN /bin Domain_User Domain_pass

Well, I use the same user/pass for login to my windows (2000) laptop and
for login to the domain, and it is taht user/password that I put on the
fs-cifs command line. I don’t know what it does with past that point…
but I expect that is how it authenticates itself to the domain server.

So, yes, I think that would be right.

-David

QNX Training Services
http://www.qnx.com/support/training/
Please followup in this newsgroup if you have further questions.

“Eric Norton” <enortonNOSPAM@NOSPAMfct.ca> wrote in message
news:3D5BCAF6.4070900@NOSPAMfct.ca

Hey,

I’ve been trying to setup mount points to windows shares from QNX 6.2
and I’m having some difficulties using fs-cifs. I’m trying to map to a
windows share that is accessible by “Everyone” and doesn’t have any
authentication setup whatsoever. So if I try to run this command it
doesn’t work:

fs-cifs //Laptop:Radial:/ /Mp3 guest none

I’ve trying various other combinations, like using the administrator
login/password without any luck. If anyone who is using fs-cifs could
post some examples of what they did and if there are any particulars
that need to taken off on the windows side, I would greatly appreciate it.

Thanks,
Eric

Up front, the shipped 6.2 version of fs-cifs will not handle the below IFS
script, but I have tested and confirmed a fix for all CPU variants.
I set up my shares on Windows so that permissions are given to a user id of
“target” with read and change access for each share, where “target” user id
is set up in advance on the Windows host.
With that said, the following IFS works with Windows NT/2K/XP.

\

Target: pentium 233

IP: 10.75.1.106

Root: 10.75.1.1, labxp

Date: August 16, 2002

[virtual=x86,bios +compress] boot = {
startup-bios -N tx86p233 -D console -v
PATH=/proc/boot:/bin:/sbin:/usr/bin:/usr/sbin
LD_LIBRARY_PATH=/proc/boot:/lib:/lib/dll:/usr/lib procnto
}

[+script] .script = {

procmgr_symlink …/…/proc/boot/libc.so.2 /usr/lib/ldqnx.so.2

networking

display_msg Starting TCP/IP…
io-net -d ne2000 -p tcpip-v4
waitfor /dev/socket
waitfor /dev/io-net
ifconfig en0 10.75.1.106

remote file systems



display_msg CIFS mounting / from labxp …
fs-cifs //labxp:10.75.1.1:/x86 / target target
waitfor /bin/mount 10
waitfor /usr/sbin/fs-nfs2 10
waitfor /tmp

display_msg CIFS mounting /usr …
mount -t cifs -o target,target //labxp:10.75.1.1:/usr /usr

waitfor /usr/info
waitfor /usr/man
waitfor /usr/lib/terminfo
waitfor /usr/photon/config
waitfor /usr/photon/font_repository
waitfor /usr/photon/keyboard
waitfor /usr/photon/palette
waitfor /usr/photon/share
waitfor /usr/photon/translations
waitfor /usr/photon/welcome
waitfor /usr/share

display_msg NFS mounting /etc from Release Branch file server…
fs-nfs2 10.75.1.200:/xfer/etc/6.2 /etc
waitfor /etc
display_msg NFS mounting /etc/sysinit…
mount -t nfs 10.75.1.200:/xfer/sysinit /etc/sysinit
waitfor /etc/sysinit

some drivers/managers we want started before the initialization file

display_msg Starting remaining drivers…
slogger -l /tmp/p233.slog
devc-con -e -n 9
waitfor /dev/con1
reopen
devc-pty -e
devc-ser8250 -u1 3f8,4 -u2 2f8,3
seedres
pci-bios
pipe
waitfor /dev/pipe

final system initialization

display_msg Handing off to /etc/sysinit/toolslab.init …
on -t /dev/con1 /bin/ksh -i /etc/sysinit/toolslab.init labxp cifs default
}

links

[type=link] /dev/console=/dev/con1
[type=link] /bin/ph=/etc/sysinit/ph.init

libraries

devn-ne2000.so
npm-tcpip-v4.so
libsocket.so
libc.so.2

\

image binaries

[data=c]

io-net
ifconfig
fs-cifs

added data & scripts

[perms=+r]

/tx86p233.labxp.cifs.bld=./tx86p233.labxp.cifs.bld

Up front, the shipped 6.2 version of fs-cifs will not handle the below
IFS
script, but I have tested and confirmed a fix for all CPU variants.
I set up my shares on Windows so that permissions are given to a user id
of
“target” with read and change access for each share, where “target” user
id
is set up in advance on the Windows host.
With that said, the following IFS works with Windows NT/2K/XP.

Allen,

What exactly is an IFS script? And how would I use it to solve my problem?

Thanks,
Eric

What exactly is an IFS script? And how would I use it to solve my
problem?

IFS stands for image file system - it’s the build file he included in his
post. The .script{} area is where all the fs-ifs stuff gets done, and what
you’re mostly likely going to be interested in.

\

Cheers,
Adam

QNX Software Systems Ltd.
[ amallory@qnx.com ]

With a PC, I always felt limited by the software available.
On Unix, I am limited only by my knowledge.
–Peter J. Schoenster <pschon@baste.magibox.net>

An IFS script is the build script for a system. For example, the basic image
for the self hosted environment is found in
/x86/boot/build/qnxbasedma.build. It simply sets up some paths, and links
then calls diskboot, which takes over.

You’ll also find some other examples in this directory, which are a little
more complex, since they don’t call diskboot. Rather they specifiy the
services that are to be started, and the order to start them in.

In your case, you could edit your qnxbasedma.build to start networking using
io-net and then start fs-cifs. In an embedded case, this may be desirable,
however, you can accomplish the same thing by creating and editing your
/etc/rc.d/rc.local.

Hope this helps.

Cheers,
-Brian

“Eric Norton” <enortonNOSPAM@NOSPAMfct.ca> wrote in message
news:ajtkdg$ral$1@inn.qnx.com

Up front, the shipped 6.2 version of fs-cifs will not handle the below
IFS
script, but I have tested and confirmed a fix for all CPU variants.
I set up my shares on Windows so that permissions are given to a user id
of
“target” with read and change access for each share, where “target” user
id
is set up in advance on the Windows host.
With that said, the following IFS works with Windows NT/2K/XP.

Allen,

What exactly is an IFS script? And how would I use it to solve my
problem?

Thanks,
Eric

“Eric Norton” <enortonNOSPAM@NOSPAMfct.ca> wrote in message
news:ajtkdg$ral$1@inn.qnx.com

Up front, the shipped 6.2 version of fs-cifs will not handle the below
IFS
script, but I have tested and confirmed a fix for all CPU variants.
I set up my shares on Windows so that permissions are given to a user id
of
“target” with read and change access for each share, where “target” user
id
is set up in advance on the Windows host.
With that said, the following IFS works with Windows NT/2K/XP.

Allen,

What exactly is an IFS script? And how would I use it to solve my
problem?

Thanks,
Eric

IFS - Image File System, created by the mkifs utility, which creates a
bootable IFS image for a target.
e.g. # mkifs -v ifs.script t.ifs
t.ifs can be served to a target via boot floppy or bootpd/tftpd
Standared and Professional editions ship with mkifs, the free version does
not.

The example I gave you was for a pentium 233 target, which gets all of its
runtime binaries across the CIFS mount. I also have alternate scripts that
use NFS to obtain a remote file system as the targets root. The example
demonstrates both ‘fs-cifs’ command line as well as ‘mount -t cifs’ methods
of obtaining cifs mounts. There is no dependancy on an IFS script for
fs-cifs to work; if you’re just seeking a connection from your Neutrino
Development box (a.k.a. ‘RTP’) you could simply put your commands in
/etc/rc.d/rc.local so that your mounts are made at boot time. And, as I
said before, there are some bugs in the released 6.2 version of fs-cifs that
prevents my script from working properly. Future updates will resolve the
issue.

My example uses shares set up on the local server (any of NT/XP/2000) for
user ‘target’. I created a user account ‘target’ on the local server with
the password ‘target’, and then created shares on the local server with
read/change permissions for user ‘target’.

Hopefully the complete working example will help you solve your problem.