Operating System - HP-UX
1829952 Members
2273 Online
109998 Solutions
New Discussion

as/400 IFS and cifsclient

 
Patrick Provenzo
Frequent Advisor

as/400 IFS and cifsclient

I am trying to mount an IFS file system from an AS/400 to my unix 11i server using cifsclient. Whenver I try to mount the directory I get a connection refused. The as/400 admin says my acount is authorized. I can mount the same AS/400 direcotry to my PC wihtout issue using the same id/paasword. I can even ftp to the AS/400 from my unix server to the as/400. I just can't get the IFS filesystem to mount on unix. Any Ideas?
43 REPLIES 43
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

The favourite cifsmount command on the forum seems to be this:

/usr/bin/cifsmount "//AS400/sharename" /mountpoint -U username -P password -I ipaddressofAS400

Does that make sense to you?

I've only ever done this with windows machines.
RAC_1
Honored Contributor

Re: as/400 IFS and cifsclient

What is the command do you use?? cifsmount??, do you specify -u (or -U) option to mount it??
There is no substitute to HARDWORK
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

I use the following command to do the mount:
cifsmount //DEVAS01/QIBM/UserData/mqm/qmgrs/DEVAS01/errors /DEVAS01 -I xxx.xx.x.xxx -U E0026887

Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

Hmmm, that path should be a share so it should look like:

//server/share not //server/dir/dir/dir/dir

How did you mount it on your PC?
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

I used the map network drive tool and gave it the same path.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

Can you try //DEVAS01/QIBM instead please?

Just to satisfy my curiosity.

Oh and try specifying -P password too.
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

Tried both of those already. Still get connection refused.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

This post came up recently:

http://forums1.itrc.hp.com/service/forums/bizsupport/questionanswer.do?threadId=949365

It is pretty involved and might not solve your problem.

The cifsmount command I gave certainly works for me. I really don't have enough experience with AS/400 to go further than that.

Another command you might want to try is smbclient \\server\share.

Good Luck
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

Sorry that other command should be:

/usr/local/samba/bin/smbclient '\\server\share' -W domain -U username
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

used the smbclinet commnad and i could connect and browse the directory. Still cna't mount it though. I want to mount it to one of my unix systems os that we can use IT/O agants to monito the logs.
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

Inetresting. If I try to cifsmount the AS/400 share the connection gets refused. However, If I use the smbclient command I can connect and browse the share.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

There is an smbmount command, oh that's probably linux.

How about cifslogin followed by cifsmount? I'll look up the exact command.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

There is an smbmount command, oh that's probably linux.

How about cifslogin followed by cifsmount? I'll look up the exact command.

apparently it is:

cifslogin servername username

This post in the forum has a document attached which looks quite helpful.

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=841850

This post gives some detail on mount -F cifs:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=529290
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

You might want to try the -u option with cifsmount, this will send passwords plain text, which might be what smbclient is doing.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

Patrick thanks for the points. If you could let me know whether you made any progress too I'd appreciate it.

I'm guessing from the point score that it still doesn't work?
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

No. No progress yet. I tried the -u option still doesn't like it. Trying to get info from my as/400 gurus to tell me what if anything they see on their side.
Eric Raeburn
Trusted Contributor

Re: as/400 IFS and cifsclient

Hello, Patrick,

Eric from the HP CIFS Client development lab here.

There are several things we can try. Let's start with these:

First, what version of the CIFS Client are you using (do 'cifsclient status' or 'swlist | grep CIFS'), what version of HPUX ('uname -r'), and what is the name of the CIFS server software on the AS/400? (For example, the CIFS server software on HPUX is Samba.)

Next, Gavin was correct when he spotted an error in your syntax, in particular:

//server/dir/dir/...

is invalid; you must use:

//server/share

where "server" is the NetBIOS name of the server and "share" is the share-name of the shared directory on the server. If the server's NetBIOS name is the same as its DNS name, and it is in the same DNS domain as the CIFS Client, you should not need the "-I " option, but it won't hurt in any case. Please try again, ensuring that the syntax is correct. The syntax to use is:

cifsmount //server/share /mountpoint -U user [-I ]

The server and share names should be the same as those used in the "\\server\share" string that successfully mapped a drive on the PC. The user name and password should also match those used on the PC when the drive was mapped.

If that fails, please do the following:

1. Shut down the CIFS Client ('cifsclient stop').

2. Edit /etc/opt/cifsclient/cifsclient.cfg and enable the following "logLevels" by removing any comment symbols preceding them:

nfsTrace
cifsTrace
smbSequence

3. Restart the CIFS Client, redo the cifsmount command, and post a reply to this forum. Indicate the exact wording of the error message, and attach the cifsclient logfile, which will be /var/opt/cifsclient/debug/client-log., where "pid" is the process id of the CIFS Client daemon, cifsclientd (correlate the pid with the "status:" line displayed by 'cifsclient status'.

4. Also post the versions I requested at the beginning of this message.

Finally, please let us know if your HPUX system has "tcpdump" or "ethereal" installed, if we need those for further diagnostics.

Good luck,
Eric
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

Patrick, I'm glad to see you're still out there and plugging away at it. I'm sorry it doesn't work yet.

It does seem odd that smbclient works but cifsmount doesn't, does cifsclient and/or cifslogin work or not?

I'm really short of ideas from my limited knowledge of cifs. Looks like Eric has rather more depth of experience on this, I think I'll learn something from this once it is solved.

Eric, you really can map a drive \\server\dir\dir... with windows, I tried it. I don't quite understand it but it works. Thanks for joining in, I'm almost out of steam.

Patrick, there are quite a few posts about ethereal on the forum which you can search for, if you find that you need to go that route.
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

Ok.

I am running version: FILESET HP CIFS CLIENT: Version: A.01.09. I am running HP-UX 11i v1 on the Unix side. I ma not sure what the AS/400 software is called.

I shut down the cifsclient and edited the config file as Eric suggested. I restarted adn retried the cifsmount. Here is the error reruend to my screen:

root@grtux12# cifsmount //DEVAS01/QIBM /DEVAS01 -U E0026887
Remote user E0026887's password:
Connecting Server: UNIX: Connection refused

Here is what I get in the cifsclient log:

09-06 07:19:21.660 [0] CIFS Client start; version=A.01.09, pid=5201
09-06 07:20:11.829 [0] Establishing connection to server DEVAS01: connectTimeout: 5000, requestTimeout: 60000

I do have tcpdump installed.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

What happens if you mount it on a windows box then share it and connect to that share with cifsmount?

Not that I'm suggesting this is a good permanent solution, it could be interesting to see whether it works though?
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

If I map the drive to my PC, I don't see a way to share it out again.
Gavin Clarke
Trusted Contributor

Re: as/400 IFS and cifsclient

No, you're right.

Sorry, bad suggestion, I thought it would work, I should have tested it first.
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

I tried runnig tcpdump while doing the cifsmount. Here is the output along wiht the tcpdump commnad I used:


root@grtux12# /usr/local/sbin/tcpdump -l -t -vv host 166.99.2.182
tcpdump: listening on lan0, link-type EN10MB (Ethernet), capture size 68 bytes
IP (tos 0x0, ttl 64, id 34122, offset 0, flags [DF], length: 48) grtux12.ch.etn.com.61272 > devas01.ch.etn.com.netbios_ssn: S [tcp sum ok] 3977437760:3977437760(0) win 32768
IP (tos 0x0, ttl 64, id 22510, offset 0, flags [DF], length: 48) devas01.ch.etn.com.netbios_ssn > grtux12.ch.etn.com.61272: S [bad tcp cksum b5e4 (->85e5)!] 4103948092:4103948120(28) ack 3977437761 win 8192
IP (tos 0x0, ttl 64, id 34123, offset 0, flags [DF], length: 112) grtux12.ch.etn.com.61272 > devas01.ch.etn.com.netbios_ssn: P 1:73(72) ack 1 win 32768
IP (tos 0x0, ttl 64, id 22511, offset 0, flags [DF], length: 45) devas01.ch.etn.com.netbios_ssn > grtux12.ch.etn.com.61272: P [tcp sum ok] 1:6(5) ack 73 win 32768
IP (tos 0x0, ttl 64, id 22512, offset 0, flags [DF], length: 40) devas01.ch.etn.com.netbios_ssn > grtux12.ch.etn.com.61272: FP [tcp sum ok] 6:6(0) ack 73 win 32768
IP (tos 0x0, ttl 64, id 34124, offset 0, flags [DF], length: 40) grtux12.ch.etn.com.61272 > devas01.ch.etn.com.netbios_ssn: . [tcp sum ok] 74:74(0) ack 7 win 32768
IP (tos 0x0, ttl 64, id 34125, offset 0, flags [DF], length: 40) grtux12.ch.etn.com.61272 > devas01.ch.etn.com.netbios_ssn: F [tcp sum ok] 73:73(0) ack 6 win 32768
IP (tos 0x0, ttl 64, id 22513, offset 0, flags [DF], length: 40) devas01.ch.etn.com.netbios_ssn > grtux12.ch.etn.com.61272: P [tcp sum ok] 7:7(0) ack 74 win 32768
arp who-has 166.99.82.130 tell devas01.ch.etn.com
Patrick Provenzo
Frequent Advisor

Re: as/400 IFS and cifsclient

Tried turnig on all logging in the cifsclient config file and rerunning the cifsmount command. Here is the output:

09-06 10:30:03.092 [0] CIFS Client start; version=A.01.09, pid=6174
09-06 10:30:45.977 [2] ipcserver: accepted client connection
09-06 10:30:48.225 [3] pslsocket: allocated new object at 0x400164c8
09-06 10:30:48.226 [3] netbios: allocated new object at 0x40016390
09-06 10:30:48.227 [3] server: allocated new object at 0x400161b8
09-06 10:30:48.228 [2] ipcserverstub: connectServer(0,3): DEVAS01 (null string) (null string) -1 0
09-06 10:30:48.228 [0] Establishing connection to server DEVAS01: connectTimeout: 5000, requestTimeout: 60000
09-06 10:30:48.237 [3] message: allocating new object 0x40018910
09-06 10:30:48.238 [6] <- Tx: 81 00 00 44 ...D
09-06 10:30:48.238 [6] <- Tx: 20 45 45 45 46 46 47 45 42 46 44 44 41 44 42 43 EEEFFGE BFDDADBC
09-06 10:30:48.238 [6] <- Tx: 41 43 41 43 41 43 41 43 41 43 41 43 41 43 41 43 ACACACAC ACACACAC
09-06 10:30:48.239 [6] <- Tx: 41 00 20 45 48 46 43 46 45 46 46 46 49 44 42 44 A. EHFCF EFFFIDBD
09-06 10:30:48.239 [6] <- Tx: 43 43 41 43 41 43 41 43 41 43 41 43 41 43 41 43 CCACACAC ACACACAC
09-06 10:30:48.239 [6] <- Tx: 41 43 41 00 ACA.
09-06 10:30:48.241 [6] -> Rx: 83 00 00 01 ....
09-06 10:30:48.241 [6] -> Rx: 82 .
09-06 10:30:48.241 [5] netbios: session 0x83 len 1
09-06 10:30:48.242 [3] netbios: setting rxDataAlloc=2048
09-06 10:30:48.242 [5] netbios: negative session response 0x82 (Called name not present)
09-06 10:30:48.246 [2] ipcserver: closing client connection
09-06 10:31:18.233 [3] server: freeing object at 0x400161b8
09-06 10:31:18.233 [3] netbios: freeing object at 0x40016390
09-06 10:31:18.234 [3] pslsocket: freeing object at 0x400164c8

Can someone tell me what the "negative session response 0x82" and "Called name not present" mean? Is there a name resolution issue? When I do nslookup of the server name and ip address from my unix server the names resolve correctly through DNS.