Operating System - HP-UX
1822010 Members
4068 Online
109639 Solutions
New Discussion юеВ

Configuring SAMBA in HP-UX 11.11 server

 
ckchai
Frequent Advisor

Configuring SAMBA in HP-UX 11.11 server

Hi,
I'm configuring SAMBA at HP-UX 11.11 server.
To shared a directory in Unix to my Windowns 2000 desktop.

I have problem mapping the directory because the userid is incorrect.

Below is all the documents that all the steps that I have done. And the smb.conf file.

Anyone have experience on SAMBA and able to help? Thank you very much.

ckchai
22 REPLIES 22
Steven E. Protter
Exalted Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Shalom,

I would suggest a simple solution.

adduser useradd to the OS.

Make it the owner of the files in the share.

smbpasswd -a usrname (same user name)

set a password in the above command. Samba uses its own security file.

Set smb.conf to security = user

set the share in smb.conf, there are examples in the file.

/sbin/init.d/samba start

Configure samba to autostart in /etc/rc.config.d/samba (first variable set to 1).

Windows search, search for the hpux box.

Click in, eventually you'll be prompted for a user id and password, which you set above in smbpasswd.

You could also go security = ads and use net join to join the HP system to a Windows domain. That would require admin(root) password to the Windows Domain controller.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Steven,

I have try to set the "security = user" but still unable to map the drive at my desktop.

Attached is a document file that I capture my smb.conf file and all the steps I used to configured the SAMBA.

You can have a look at the file.


Thank you for your respond.

ckchai
Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi,

>adduser useradd to the OS.


Did you add the sysbck user in the /etc/passwd

grep sysbck /etc/passwd


-Rasheed Tamton
Steve Lewis
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

I suspect your umask settings and the permissions of that directory.

Does that user have permission to cd to that directory from a shell prompt?

Do you also have the eXecute bit set on that directory?
i.e. r-x or rwx for that user or one of the user's groups.

Does that user own the directory? Can you make that user own the directory?

Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

I checked your attachment
1. You have not added the user in /etc/passwd
2. You are using share level security

Security = share

SEP has already told you to make it user

Change
Security = share
to
Security = user

and stop/start samba

You can also test it by:
#/opt/samba/bin/testparm

#/opt/samba/bin/smbclient -L `hostname` -U sysbck

(it will show ask you the passwd and if all ok, will show the share info)


Rasheed Tamton.


ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi all,

Actually I already added the user to /etc/passwd before i setup the SAMBA.
And also the directory is 777 for /home/sysbck/sambatest.

Below is the screen capture:-


Check user is add to /etc/passwd

DR rwbsapa4:/# grep sysbck /etc/passwd
sysbck:UDRa2zP.E2Tlw:101:20:,,,:/home/sysbck:/usr/bin/sh
DR rwbsapa4:/#

Check permission for /home/sysbck/sambatest
DR rwbsapa4:/home/sysbck# ll
total 80
-r--r--r-- 1 sysbck users 832 Nov 14 2000 .cshrc
-r--r--r-- 1 sysbck users 347 Nov 14 2000 .exrc
-r--r--r-- 1 sysbck users 334 Nov 14 2000 .login
-r--r--r-- 1 sysbck users 439 Nov 14 2000 .profile
-rw------- 1 sysbck users 64 Apr 24 17:40 .sh_history
drwxrwxrwx 2 sysbck users 96 Apr 23 18:59 sambatest
DR rwbsapa4:/home/sysbck#


I have also tried to set "security = user" but still not work. with different error message. That is why i set it back to "securiy = share". Attached is the error message I get when "security = user".



ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

I have perform the /opt/samba/bin/testparm
And smbclient command.
I did some correction the is suggested by testparm. Like add smbnull user to /etc/passwd & change the sambatest name to less than 8 character (test).

Attached is the screen capture of testparm and smbclient.

Please refer to the attachment.

thanks,
ckchai

Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi chchai,

Can you do the below:

/opt/samba/bin/smbclient //yourhostname/yoursharename -U sysbck

it will ask for the passwd; if it is ok you will get a smb: \> prompt. Do ls and also make a dir., (mkdir ttest), exit and go to the dir which maps the share, if it is there that means everything is ok from the server side.

Now go to your pc and just say
\\yourhostname
it will ask for the username , passwd
type
sysbck
passwd
and see whether you can see the share.

Regards,
Rasheed Tamton.
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

I had a "session setup failed = NT_STATUS_LOGON_FAILURE" error message while running smbclient command.

This is the screen capture message:-

DR rwbsapa4:/# /opt/samba/bin/startsmb
Samba started successfully; process ids: smbd: 29248, nmbd: 29246
DR rwbsapa4:/# /opt/samba/bin/smbclient //rwbsapa4/test -U sysbck
added interface ip=188.8.1.108 bcast=188.8.255.255 nmask=255.255.0.0
added interface ip=192.1.1.2 bcast=192.1.1.255 nmask=255.255.255.0
Password:
session setup failed: NT_STATUS_LOGON_FAILURE
Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi ckchai,

Do this:

/opt/samba/bin/smbpasswd sysbck (username)
give a new passwd

and the use this new passwd with
/opt/samba/bin/smbclient



Rasheed Tamton.
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

The server site now is ok. With smbclient command, after I have reset the sysbck(username) password.

Now at my PC site I have porblemmapping the drive with \\rwbsapa4.

Error:-
"\\rwbsapa4" network path cannot be found.

Screen capture of smbpasswd & smbclient output:-

DR rwbsapa4:/# /opt/samba/bin/smbpasswd sysbck
New SMB password:
Retype new SMB password:
Password changed for user sysbck.
DR rwbsapa4:/# /opt/samba/bin/smbclient //rwbsapa4/test -U sysbck
added interface ip=188.8.1.108 bcast=188.8.255.255 nmask=255.255.0.0
added interface ip=192.1.1.2 bcast=192.1.1.255 nmask=255.255.255.0
Password:
Domain=[WORKGROUP] OS=[Unix] Server=[Samba 2.2.5]

smb: \> ls
. D 0 Mon Apr 23 18:59:50 2007
.. D 0 Mon Apr 23 18:59:50 2007

53248 blocks of size 1024. 48600 blocks available
smb: \> ls
. D 0 Mon Apr 23 18:59:50 2007
.. D 0 Mon Apr 23 18:59:50 2007

53248 blocks of size 1024. 48600 blocks available
smb: \> pwd
Current directory is \\rwbsapa4\test\
Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi ckhaci,

As a quick solution can you use
\\ipnumber instead of the hostname

Did you add the hostname of the server on the C:\WINDOWS\system32\drivers\etc\hosts file.

Can you ping the hostname from the windows; do a ping servername from the cmd prompt.

Regards,
Rasheed Tamton.
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

1)I tried to map the ip address of the server instead of hostname.
\\188.8.1.108 it says "host not found".


2) yes, at the windows etc/hosts file I already add the ip address of the server and hostname.

3) yes, I can ping the server rwbsapa4 at my PC command prompt. the return ip also match= 188.8.1.108

Is there any services of protocol I need to install at my Windows PC to make it work?

regards,
ck chai
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

Could it be the nslookup unable to resolved "rwbsapa4" to 188.8.1.108?

Attached is the ping output and nslookup output:-

1) Ping ip 188.8.1.108 from 188.9.4.208 :-

C:\Documents and Settings\ckchai>ping 188.8.1.108

Pinging 188.8.1.108 with 32 bytes of data:

Reply from 188.8.1.108: bytes=32 time=5ms TTL=253
Reply from 188.8.1.108: bytes=32 time=2ms TTL=253

Ping statistics for 188.8.1.108:
Packets: Sent = 2, Received = 2, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 2ms, Maximum = 5ms, Average = 3ms


2) ping rwbsapa4:-
C:\Documents and Settings\ckchai>ping rwbsapa4

Pinging rwbsapa4 [188.8.1.108] with 32 bytes of data:

Reply from 188.8.1.108: bytes=32 time=230ms TTL=253
Reply from 188.8.1.108: bytes=32 time=5ms TTL=253
Reply from 188.8.1.108: bytes=32 time=3ms TTL=253
Reply from 188.8.1.108: bytes=32 time=2ms TTL=253

3) nslookup "rwbsapa4" from my PC:-
C:\Documents and Settings\ckchai>nslookup
Default Server: wgcdc02
Address: 188.9.4.2

> 188.8.1.108
Server: wgcdc02
Address: 188.9.4.2

DNS request timed out.
timeout was 2 seconds.
*** Request to wgcdc02 timed-out
>


Dino_4
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server


Hi,

I don't think that the DNS-Problem has anything to do with the Samba-login-process.

What is more important the Samba-connection or DNS working properly?

For the Samba, check that the daemons are running on the Samba-Server:

# ps -ef | grep mbd

At least 2 processes have to show up (smbd and nmbd,children of process-ID 1).

If they do, try to connect from the pc with this path: \\\.

What happens??








Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi ckchai,

Try these options:

- Try from another PC to connect the same share
-From your pc, do this:
nbtstat -a your-samba-server-name
nbtstat -A your-samba-server-ip

-From another hp-ux server also do this:
man nmblookup
/opt/samba/bin/nmblookup your-samba-server-name
/opt/samba/bin/nmblookup -A your-samba-server-ip
-try to mount the share from a pc from the same subnet as the hp-ux server
-FQDN - check whether you are using fully qualified dom name
-wins - check about wins
-Try change your workgroup name on both hp-ux server and the pc. Restart samba on server,

and see whether you can connect. If it works, you can change back to the old name and test

it
-if you are using a firewall on windows, stop that
-also check whether the port is opened for your server
- or it might be a winsock corruption and try with Windows experts

Rasheed Tamton.
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

Sorry, I have been away for a while.

The samba problem still there.

I have answer all your question or test that you suggest in the last reply.

Attached is all the screen capture or answer to all your questions.

Thank you.
Have a nice day.

ck chai
Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi ckchai,

>/opt/samba/bin/nmblookup your-samba-server-name
>/opt/samba/bin/nmblookup -A your-samba-server-ip

Sorry. What I meant was to use your PC Name and IP instead of the samba-server-name/ip. Because you are running these commands from hp-ux server.

If still does not work, add the FQDN of your PC on /etc/hosts of the hp-ux server.

188.9.4.208 wgenting.genting.corp wgenting

and restart the samba

You won't believe our weekend is about to start. I am not sure I can follow-up the thread on the weekend.

Regards,
Rasheed Tamton.
ckchai
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi Rasheed,

My answer to your question.

>/opt/samba/bin/nmblookup your-samba-server-name

DR rwbsapa4:/# /opt/samba/bin/nmblookup 19-sap-eddie
querying 19-sap-eddie on 188.8.255.255
querying 19-sap-eddie on 192.1.1.255
name_query failed to find name 19-sap-eddie
DR rwbsapa4:/#
DR rwbsapa4:/# /opt/samba/bin/nmblookup 19-SAP-EDDIE
querying 19-SAP-EDDIE on 188.8.255.255
querying 19-SAP-EDDIE on 192.1.1.255
name_query failed to find name 19-SAP-EDDIE
DR rwbsapa4:/#

DR rwbsapa4:/# /opt/samba/bin/nmblookup 19-sap-eddie.wgenting.genting.corp
querying 19-sap-eddie.wgenting.genting.corp on 188.8.255.255
querying 19-sap-eddie.wgenting.genting.corp on 192.1.1.255
name_query failed to find name 19-sap-eddie.wgenting.genting.corp


>/opt/samba/bin/nmblookup -A your-samba-server-ip

DR rwbsapa4:/# /opt/samba/bin/nmblookup -A 188.9.4.208
Looking up status of 188.9.4.208
19-SAP-EDDIE <00> - M
WGENTING <00> - M
19-SAP-EDDIE <03> - M
19-SAP-EDDIE$ <03> - M
19-SAP-EDDIE <20> - M
WGENTING <1e> - M
CKCHAI <03> - M


My /etc/hosts entry.

188.9.4.208 19-sap-eddie.wgenting.genting.corp 19-sap-eddie


I'm also attached all my screen capture for your reference.
thank you.

ckchai


Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Hi ckchai

nmblookup shows there is progress
Are you using DHCP.

Please do as belowon hp-ux box:
1. Check your current IP from your PC and update it on /etc/hosts file on hp-ux server
2./opt/samba/bin/nmblookup -A 188.9.4.208 (ip of the pc)
3./opt/samba/bin/nmblookup 19-sap-eddie (name of the pc)
4.on /etc/opt/samba/lmhosts file add the ip and hostname of the PC (if the lmhosts

file is not there - create new one)
5.stop and start the samba (/opt/samba/bin/stopsmb and /opt/samba/bin/startsmb)
6.smbclient -L hp-ux-hostname -U usernmame
7./opt/samba/bin/smbstatus
8. /opt/samba/bin/nmblookup WORKGROUP

On your PC do as below:
1.check C:\WINDOWS\system32\drivers\etc\lmhosts and hosts file; update the correct ip

and name of the hp-ux-server on both files - make sure same info exists in both files
2.nbtstat -A 188.8.1.108 (ip of the hp-ux box)
3.nbtstat -a rwbsapa4 (hostname of hp-ux box)
4.Start\run \\188.8.1.108 (ip-of-the-server)
5.Start\run \\rwbsapa4 (hostname-of-the-server)

Let us know the result of each one above (step-by-step with error messages)

Regards,
Rasheed Tamton.
sanwin
Frequent Advisor

Re: Configuring SAMBA in HP-UX 11.11 server

hi,
Is it something like the same user should also exist in windows side?

regards,
sanwin.
Rasheed Tamton
Honored Contributor

Re: Configuring SAMBA in HP-UX 11.11 server

Same user on both platforms is not required for samba.

Regards,
Rasheed Tamton.