Operating System - HP-UX
1824210 Members
4211 Online
109669 Solutions
New Discussion

Samba 2.2.3a Doesn´t work with smbclient.

 
SOLVED
Go to solution
Catalina Sendoya
Occasional Advisor

Samba 2.2.3a Doesn´t work with smbclient.

I have installed the samba 2.2.3a and I have the service smb y nmb running. But when I try to connect to the server with the command, smbclient, It doesn´t work, this is the error:

/smbclient -L Server

added interface ip=192.168.1.2 bcast=192.168.1.255 nmask=255.255.255.0
added interface ip=172.16.0.16 bcast=172.16.255.255 nmask=255.255.0.0
added interface ip=172.16.0.18 bcast=172.16.255.255 nmask=255.255.0.0
Password:
Domain=[Mydomain] OS=[Unix] Server=[Samba 2.2.3a]
tree connect failed: SUCCESS - 0

It has logged an error in the samba.log:

[2004/11/24 15:55:14, 0] passdb/pdb_smbpasswd.c:pdb_getsampwnam(1367)
unable to open passdb database.
[2004/11/24 15:55:14, 0] lib/util_sec.c:assert_gid(111)
Failed to set gid privileges to (-1,-2147483648) now set to (0,0) uid=(0,0)
[2004/11/24 15:55:14, 0] lib/util.c:smb_panic(1064)
PANIC: failed to set gid
I tried to Join to domain with the command:
smbpasswd -j MYDOMAIN -r Server_PDC -U xxx
It worked.

Please help me,
** edited to comply with forum guidelines **

thank you.

Catalina

10 REPLIES 10
Geoff Wild
Honored Contributor

Re: Samba 2.2.3a Doesn´t work with smbclient.

Try it like so:

/opt/samba/bin/smbclient -U=yourntid -L yourservernetbiosname

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Catalina Sendoya
Occasional Advisor

Re: Samba 2.2.3a Doesn´t work with smbclient.

I doesn´t work. I receive the message:

load_unicode_map: filename /usr/local/samba/lib/codepages/unicode_map.850 does not exist.
load_unicode_map: filename /usr/local/samba/lib/codepages/unicode_map.ISO8859-1 does not exist.
added interface ip=192.168.1.2 bcast=192.168.1.255 nmask=255.255.255.0
added interface ip=172.16.0.16 bcast=172.16.255.255 nmask=255.255.0.0
added interface ip=172.16.0.18 bcast=172.16.255.255 nmask=255.255.0.0
Password:
session setup failed: NT_STATUS_LOGON_FAILURE


And I receive in the /tmp/samba.log the message:

[2004/11/24 17:45:07, 0] passdb/pdb_smbpasswd.c:(1369)
unable to open passdb database.
[2004/11/24 17:45:07, 0] lib/util_sec.c:(111)
Failed to set gid privileges to (-1,-2147483648) now set to (0,0) uid=(0,0)
[2004/11/24 17:45:07, 0] lib/util.c:(1094)
PANIC: failed to set gid

Can you help me?

thank yo
Steven E. Protter
Exalted Contributor

Re: Samba 2.2.3a Doesn´t work with smbclient.

I would recommend moving away from a compiled version of Samba and go with the hp ported version.

Server:
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8725AA

Client:
http://software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=B8724AA

Thats production code. There is a Samba 3 preview edition as well.

Get the samba binaries you have now off your system prior to installing the depots I recommend.

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
Ermin Borovac
Honored Contributor
Solution

Re: Samba 2.2.3a Doesn´t work with smbclient.

When you run 'smbclient -L ' it will try to connect to your samba server as user defined with 'guest account' parameter in smb.conf.

Default value for 'guest account' is 'nobody'. This user id by default on HP-UX has negative group id (gid). This would explain error 'PANIC: failed to set gid'.

Please try creating another UNIX user (e.g. smbnull) assign it to non-negative group and set 'guest account' in smb.conf to 'smbnull'.
Catalina Sendoya
Occasional Advisor

Re: Samba 2.2.3a Doesn´t work with smbclient.

Hello,
I change to the samba 2.2.8a. I create a user pcguest in hp-ux, and I use it like guest account in the smb.conf file.
But when I try to connect to
./smbclient -U=userdomainx -L serverUnixy
I receive the message
session setup failed: NT_STATUS_LOGON_FAILURE, and in the log file of samba i receive:

[2004/11/25 10:01:40, 0] rpc_client/cli_netlogon.c:(406)
cli_net_sam_logon_internal: NT_STATUS_NO_SUCH_USER
[2004/11/25 10:01:40, 0] smbd/password.c:(1620)
domain_client_validate: unable to validate password for user _userdomainx in domain MYDOMAIN to Domain controller *. Error was NT_STATUS_NO_SUCH_USER.
[2004/11/25 10:01:40, 0] passdb/pdb_smbpasswd.c:(1369)
unable to open passdb database.
[2004/11/25 10:01:40, 0] passdb/pdb_smbpasswd.c:(1369)
unable to open passdb database.

Then I try with the anomymous account:
./smbclient -U=pcguest -L Unixserver

And I receive a good response:
Anonymous login successful
Domain=[Mydomain] OS=[Unix] Server=[Samba 2.2.8a]

Sharename Type Comment
--------- ---- -------
datos1 Disk
oracle Disk
IPC$ IPC IPC Service (Samba 2.2.8a)
ADMIN$ Disk IPC Service (Samba 2.2.8a)

Server Comment
--------- -------
NTserver
UnixServer Samba 2.2.8a

Workgroup Master
--------- -------
MyDomain UnixServer

I need to create all users in UNIX and NT both equals???
I need to use the command smbpassword, or something like that???

Thanks.
Catalina Sendoya
Occasional Advisor

Re: Samba 2.2.3a Doesn´t work with smbclient.

Any suggestions for the permissions in HP-UX with samba 2.2.8?

Have I to create an user in HP-UX equal to NT?
Darren Prior
Honored Contributor

Re: Samba 2.2.3a Doesn´t work with smbclient.

Hi Catalina,

Have a look at the smb.conf man page for details of "username map" which will help with mapping Unix to NT usernames. You can access the man page (and detailed documentation) from SWAT, by pointing your browser at http://your_server_name:901

There's also a copy of the O'Reilly Using Samba book within Swat.

Please remember to assign points to those that have helped you - it helps others see which answers are useful, and is a free and easy way to thank contributors.

regards,

Darren.
Calm down. It's only ones and zeros...
Geoff Wild
Honored Contributor

Re: Samba 2.2.3a Doesn´t work with smbclient.

Actually, the username.map is for NT to Unix - not the other way around:

"The most common is to map usernames that users use on DOS or Windows machines to those that the UNIX box uses. The other is to map multiple users to a single username so that they can more easily share files."

If you need to go Unix to NT and NT to Unix, then I suggest you upgrade to Samba 3:

http://www.software.hp.com/portal/swdepot/displayProductInfo.do?productNumber=CIFSTP3

and enable winbind.

Your HP-UX box will have to join the domain.


Here's my plan:

First, backup old files:
cp -p /etc/opt/samba/smb.conf /etc/opt/samba/smb.conf.bak
cp -p /etc/opt/samba/username.map /etc/opt/samba/username.map.bak


Shut down samba
/opt/samba/bin/stopsmb

Remove old samba -
swremove B8725AA

I created a depot with the following:
CIFSTP3 T.30.PV.02 HP CIFS Server Technolog
J4269AA B.03.30 LDAP-UX Integration
PHSS_29486 1.0 KRB5-Client Version 1.0

Install - interactively - sellect all
swinstall -s DEPOTSERVER:/var/software/hp/samba3 @`uname -n`

Watch logfile
tail -f /var/adm/sw/swagent.log


Start samba
/opt/samba/bin/startsmb

Add to windbind to /etc/nsswitch.conf:
passwd: files winbind
group: files winbind
Add or change /etc/opt/samba/smb.conf
security = DOMAIN
idmap uid = 10000-20000
idmap gid = 10000-20000
template primary group = users
winbind separator = +
as well as valid users, example:
valid users = XXX+NTGROUP, bb, oracle, XXX+gwild
then, for each share, set the valid users as well, example:
[src]
path = /usr/local/src
valid users = bb, XXX+NTGROUP, XXX+gwild
force user = bb
Note: force user sets the Unix permissions to the uid of that user - so it must be a Unix id.
zero out the username.map file - no longer needed.
May or may not need to re-join the XXX domain:
/opt/samba/bin/net rpc join -U administrator
Start Samba and windbind from either SWAT ( http://server:901 ) or command line:
First modify startsmb and stopsmb as outlined in the Appendix, then
/opt/samba/bin/startsmb

Verify you can connect from Windows by:
Start -> Run -> \\server
Check log files on Samba Server in /var/opt/samba if it doesn't seem to be working.

Set XXX to your Windows Domain.

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Catalina Sendoya
Occasional Advisor

Re: Samba 2.2.3a Doesn´t work with smbclient.

Finally, It´s working.
Thank you very much..
Catalina Sendoya
Occasional Advisor

Re: Samba 2.2.3a Doesn´t work with smbclient.

The solution was to change the anonymous user for other different to nobody. And I used an other samba: samba 2.2.8a. This version works.
I stop and start the service samba again.
And I join to my domain: smbpasswd -j Domain -r serverNT -U Administratoraccount.