1834003 Members
1925 Online
110063 Solutions
New Discussion

Re: Samba

 
Jeffrey W. Stewart
Frequent Advisor

Samba

Two files from the following
us6.samba.org

package-hppa1.1-hp-hpux10.20

and

samba-2.2.2-hppa1.1-hp-hpux10.20

Do I need the first file?

I installed the second file in /opt/samba per the instructions. The smb.conf file verifies but does have an error that /var/opt/samba/locks is missing. I did install the recommended patch. I am using hpux 10.2x. The smbd and nmbd files execute but I don't see them with ps -e.
Any ideas on how to get Samba working? Thanks.
16 REPLIES 16
Michael Elleby III_1
Trusted Contributor

Re: Samba

Jeff-

I'm curious to know how you are invoking samba. Typically, you go to /opt/samba/bin and execute the startsmb script.

If you can't see the daemon processes with a ps -ef, then I'd re-visit your smb.conf file. Try executing the testparm script to see if it executes normally.

If this does not work, then I'd recreate your smb.conf file using the swat utility that comes with Samba.

Just my $.02 worth.

Mike-
Knowledge Is Power
U.SivaKumar_2
Honored Contributor

Re: Samba

Hi,
Does /var/opt/samba/locks exists ?. if not create it as root . Then there won't be any problem.

regards,
U.SivaKumar
Innovations are made when conventions are broken
Hartmut Lang
Trusted Contributor

Re: Samba

And make sure /var/opt/samba/locks is writable by root!

Hartmut
Stefan Schulz
Honored Contributor

Re: Samba

Hi,

after installation you should see a samba startscript in /sbin/init.d. I normally use this file to manually start/stop samba.

Also you should have a file /etc/rc.config.d/samba. Please check this file to see if it matches your installation.

When i installed samba 2.2.x i had to manually create the directory /var/opt/samba/locks. This dir looks like:
drwxr-xr-x 2 root sys 1024 Jul 12 10:38 locks

To check your installation and configuration use /opt/samba/bin/testparm.

Also for configuration use swat which comes with samba. Point your webbrowser to http://hostipadress:901.

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Jim Adamson
Frequent Advisor

Re: Samba

Jeffery,
As stated above I had to manually create the /var/opt/samba/lock file. Then use the scripts to start samba.

Also make sure the BROADCAST_ADDRESS in /etc/rc.config.d/netconf is set to xxx.xxx.xxx.255 so the pc workgroup can see the samba server in network neighbourhood/my network places.

Jim
Oh dear
rainer doelker
Valued Contributor

Re: Samba

Hi Jeffrey,

do you start "smbd -D" and "nmbd -D" to make them become a daemon.

you can use "testparm -s" to verify that your smb.conf does not contain errors.

I suspect that samba has problems starting if it cannot put any locks anywhere.

Either create /var/opt/samba/locks or configuer it to be somwhere else with the smb.conf parameter "lock dir = /var/opt/samba/locks"

I guess there might be start-scripts as well to start samba as daemon. Running a daemon is more recommended than using entries in inetd.conf.
BTW one would encounter problems if the daemons are called by inetd besides being run from a startscript.

HTH
Raine
Jeffrey W. Stewart
Frequent Advisor

Re: Samba

Michael, I don't have startsmb with the binaries I downloaded.

U.SiavKumar, creating the locks directory fixed the error with testparms

Hartmut, I made sure the permissions on locks was correct.

Stefan, I am starting the smbd and nmbd manually(deamon), so I don't think I need /sbin/init.d or /etc/rc.config.d/samba. The http://hp3070t1:901 does not work.

Jim, I attached the rc.config.d/netconf file, is it correct?

rainer, I will have to learn more about the smb.conf file. Using a downloaded binary seems to have its disadvantages.
Arockia Jegan
Trusted Contributor

Re: Samba

Did you try to run smbd in debug mode?

#smbd -D -d 0 -l

And have a look at the log level for warnings..
Stefan Schulz
Honored Contributor

Re: Samba

For the daemons to run correctly and for swat you need some entries in /etc/services and /etc/inetd.conf.

Could you please check if they look like this:

/etc/services:
swat 901/tcp # Samba configuration tool


/etc/inetd.conf:
# SMB connections handled by Samba
swat stream tcp nowait.400 root /opt/samba/bin/swat swat
netbios-ssn stream tcp nowait root /opt/samba/bin/smbd smbd
netbios-ns dgram udp wait root /opt/samba/bin/nmbd nmbd

Also i would first share something simple like /tmp.

As you said it is not necessary to use /sbin/init.d/samba and the rc.config, but i think it makes life a little bit easier.

Hope this helps

Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Jeffrey W. Stewart
Frequent Advisor

Re: Samba

Arockia J Jeganathan Pet, the smbd and nmbd daemons are running now.

Stefan, i added to /etc/services:
swat 901/tcp # Samba configuration tool

This should make the http://localhost:901 work with my browser?

/etc/inetd.conf:

swat stream tcp nowait.400 root /opt/samba/bin/swat swat

I was not sure about the nowait.400. as my file just has wait and nowait.

My problem is now mapping the share on a PC. I am reading about Encrypted passwords and trying to use the accounts I have on the hpux like
root, jstew, user1, user2
Arockia Jegan
Trusted Contributor

Re: Samba

Hi,

Add the following line in your smb.conf file,

security = user
encrypt passwords = yes

And restart the smbd and nmbd daemons. You will be able to use the shared drive. It will prompt you for user name and password when you try to access the shared drive.

I have this setup in my system and it's working fine. If you have any issues, please post your modified smb.conf file.
Arockia Jegan
Trusted Contributor

Re: Samba

Here's a simple model smb.conf file,

[global]

# workgroup = NT-Domain-Name or Workgroup-Name, eg: REDHAT4
netbios name = test1
workgroup = samba
writeable = no
logfile= /var/opt/samba/log.%m

max log size = 1000
security = user
encrypt passwords = yes
# This one is useful for people to share files
[tmp_dir]
path =
#eg: path=/test_fs/test_dir
writeable = no
browseable = yes

When it will prompt for the user name and password enter the unix user name and password. The user account should have the valid permission to access the shared directories.
Jeffrey W. Stewart
Frequent Advisor

Re: Samba

Thanks to all who replied. I can access the hp3070 via a win98 PC that uses peer to peer shares. On the win2k PC, I can see the share put not access it. I am logged in as \coname\genrad2, where coname is the company network. The win2k PC has two network cards, one for the hp3070 and one for the company network.
Maybe my win2k network card setup for the hp3070 is not setup correctly? I use a hosts file on the hp3070 and on the win98 PC. Would I need this on the win2k PC?
Arockia Jegan
Trusted Contributor

Re: Samba

If your windows2000 box is not resolving the hp system name by using DNS , then you need to have the hosts file(C:\WINNT\system32\drivers\etc\hosts).

But in your case you are able to see the share. Are you getting any specific error messages while accessing the shared drvies.
Jeffrey W. Stewart
Frequent Advisor

Re: Samba

>If your windows2000 box is not resolving the >hp system name by using DNS , then you need >to have the hosts file >C:\WINNT\system32>\drivers\etc\hosts).
I have not tried this yet. I have not looked at the network card setup for the hp3070 either.



If I do see the share is the login name used? I login as genrad2 on the win2k machine with a password. My screen shows me as \primustech\jstew. When I try accessing the share, I am not sure what parameters I should use in the net use command. The hp3070 is 192.168.15.10.


Jeffrey W. Stewart
Frequent Advisor

Re: Samba

I decided not to use SAMBA.