SMB or SAMBA ?! how does it work

hi people im a linux user but i’ll try qnx 4.25 and i have a question 4 you
i have 2 windows2000 1xp and 1win98 pluss this new qnx. Those win machines were in network sharing the folder c:/share now i need to be able to read/write from the qnx those folders and also i have a folder /share on the qnx machine that i need to read/ write from windows machines

well i know how to do that on linux w/ samba but now w/ qnx im lost if you guys could help me out …

Thanks

For QNX to read/write to windows share:
SMBfsys &
user_smb windowsuser windowspassword
mount_smb … (check doc for argument)

As for reading from windows. You need to install third part software (same samba software as on Linux) you can find it somewhere in ftp.qnx.com

Jeff Page wrote an article on this: swd.de/documents/howtos/smbstuff_en.html
Maybe he has some comments :slight_smile:

ok mario but do you know what it is called ?? samba or it has a different name

Rod,

My HowTo is a good place to look for step by step instructions.
A long time has past, but I expect SMBfsys was probably included
with the TCP/IP Runtime package that is a separate product from
the QNX 4 operating system.

You will also have to turn on an option in the config file, since
NT,2000 and XP use encrypted passwords.
I am currently using Samba to access shares on W2000 systems
and user home directories and printers both on QNX 4 from the same
W2000 systems, so it does work.

Of course W2000 shares and security permissions must be
suitably set up as well.

More details when I return home.

Jeff Page

ok thanks jeff

well let me post the mgs that im gettin’

SMBfsys -d20 &

mount_smb -mu //cut:192.168.1.96/cut /windows
Mount_SMB failed: permission denied
------------------------------====-------
both machines are in the same network 192.168.1.0/24
here goes my /etc/smb.conf
#--------start--------
[global]
guest accont = pc
work group = MAIN
server String = 1234
locking = yes
[files]
path =/files
public=yes
writeable=yes
read only = no
#-------end------

( this is the config default that come w/ the software )
PS i also dont have a windows server all machines have full access to any other machine’s HD so that means i dont have any password set up or any kind of restriction, the main question here would be : i have these 3 machines 2 win2000 and one QNX 4.25 and the QNX needs to see the win2k’s HD.

if any one have done that before and could share that w/ be great

thanks

you probably need to run “user_smb” to tell what user and what password to send to the host. I beleive both server and client need to have password and matching accound.

Note that smb.conf is to configure a server and has nothing to do with SMBfsys which is a client.

Are you running mount_smb has root? Is cut the real netbios name of the machine (not the directory), odd that machine and share drive are both name ‘cut’?

It has been a number of years since I set Samba up on my QNX 4
machine. I didn’t compile anything, so either everything was
included with QNX 4, or some of it was downloaded, probably
from Quics. I don’t really remember how I got to my current
configuration, but it has worked happily for a very long time
without problems.

Of fabulous help was the Using Samba O’Reilly book. This is one
of the most readable and helpful books the the O’Reilly series
and it includes a lot of troubleshooting and configuration stuff.
If you want to use Samba, buy the book !

The following is the config file for smbd which is the Samba daemon.
I have the daemon starting from inetd.conf and it just goes away
after it isn’t needed anymore and starts again later when needed:
netbios-ssn stream tcp nowait root /usr/local/bin/smbd smbd

I use printers physically connected on a QNX 4 machine from Windows
2000 machines. My setup is a little weird, because I use lp from
Solaris to queue print jobs on QNX. lp feeds lpsrvr.

I also mount my QNX home directory and write to it from Windows.
Depending on what machines are up, you may be happier with a Windows
machine being the “Master Browser”. In my case, QNX is always up so
I let it do it.
You need to define the usernames and passwords used on the Windows
machines on QNX, so that it can validate what is received from the
Windows machines when accessing the QNX home directory. Use the
smbpasswd command, which stores the results in
/usr/local/samba/private/smbpasswd

; /etc/smbd.conf
[global]
;debug level = 3
netbios name = alpha (this is the hostname of the QNX 4 machine)
load printers = yes
printing = qnx (use lpsrvr)
security = user
revalidate = no
username map = /etc/smb.map (the file where the microsoft passwords
are stored on QNX)
encrypt passwords = yes (necessary for NT, W2K, XP, probably ME)
workgroup = WORKGROUP (must match the workgroup on Windows)
guest account = nobody
dead time = 15
lock directory = /tmp/spool/smbd
hosts allow = 129.211.85.96/255.255.255.224 192.168.1.
(allow connections from two networks)
interfaces = 129.211.85.101/27 (IP address of the QNX 4 machine
in a small subnet)
log file = /syslog/smbd
browseable = yes
status = yes
dead time = 15
keep alive = 300
; Be Preferred Master Browser For Local Network
local master = yes
preferred master = yes
remote announce = 192.168.1.255/WORKGROUP

[printers]
path = /tmp/spool/smbd
writeable = no
printable = yes
read only = yes
public = yes
guest ok = yes
print command = /bin/cp %s /pr/smb; rm %s (little weird because I have
lpq command = /usr/ucb/lprq -P %p lp feeding lpsrvr)

[homes]
valid users = jeffp (match the login names on QNX
writable=yes and Windows or mega-ugly)
browseable=no
create mask = 0600
directory mask = 0700

To access Windows shares from QNX, you need to:

  • start the Samba filesystem
  • define the username and password
  • mount the shares
    This is a piece of a shell script I run as root:

/bin/SMBfsys -d20 &
/bin/sleep 1
/usr/bin/user_smb qnx4 ‘swordfish’ >/dev/null
/usr/bin/user_smb -u jeffp qnx4 ‘swordfish’ >/dev/null
/bin/sleep 1
/bin/mount_smb -s -mu //bravo/sharedir /w/sharedir
/bin/mount_smb -s -mu //bravo/cdrom /w/cdrom
/bin/mount_smb -s -mu //bravo/drived /w/d

The user_smb command identifies the name and password valid on
the Windows machine that will be used when a process accesses
the Windows filesystem. I define the same name and password for
both root and myself as a user, since I flip back and forth
between them. You need to define a login/password for each
different UID that a process will run as to access the shares.

For convenience, I mkdir /w as a mount point and then mount all
the various shares there. You will have one subdirectory for
each Windows share that you mount, even though they may be from
different machines. You can mount things wherever you like.

On the Windows machine, create a new user, “qnx4” in the example
above that will be used to define permissions of the process
running on the QNX machine. This way you can provide only
limited permissions to the shared directories when accessed by
the QNX machine.

You need to define the shares. Click on a folder and look at the
Properties. Select Share this folder. Give it a name. Click on
Permissions and Add the qnx4 user and provide the desired
permissions. I never quite figured out the differences, but you also
have to click on Security and assign the same user permissions here
too. If another Windows machine can access the share and the
permissions are the same for the QNX user as your remote Windows
user, you have them correct.

Make it all work on a local subnet first. You need NetBIOS over
TCP/IP to make things work. If you want to access things from
another subnet, then you might have to make a domain controller
work. By mucking with LMHOSTS, you can make it work if you
directly specify the hostname, since you won’t be able to browse
to the share. Create a link on your desktop and type \alpha
as the target. When you click on the link it will ask for your
password. If you Windows login and password are properly set up
on QNX, then you will have full access, even though you can’t
browse.

Hope this helps !