Operating System - HP-UX
1833875 Members
1618 Online
110063 Solutions
New Discussion

Cifsclient not able to view shared dir contents...

 
SOLVED
Go to solution
boomer_2
Super Advisor

Cifsclient not able to view shared dir contents...

Hi guys,
i m tryng to mount windows share on my hpux box..( hpux 11i v2,8 gb ram,cifs installed)
well through forums i was able to successfully mount the windows shared folder on my hpux box..

Test-1:/TMP 20972824 5267184 15705640 25% /windowstest

but now my problem is that im not able to access the windows directory contents ..i.e. when i do cd /windowstest i can see the files but not their contents..

# cifslist

Mounted Object Mountpoint State
-------------------------------------------------------------------------------
\\Test-1\TMP /windowstest M
===============================================================================
Server Local User Remote User Domain State
-------------------------------------------------------------------------------
Test-1 root administrator

Commanad used for mounting..


cifsmount -U administrator -P xyz //Test-1/tmp /windowstest

And my shared folder on windows has all permissions...

How do i view the shared folder contents on my hpux box....
23 REPLIES 23
Steven E. Protter
Exalted Contributor

Re: Cifsclient not able to view shared dir contents...

Shalom,

The user you are using on Unix must exist and have permissions on the windows box.

Commonly I add root to windows systems, but most people don't.

If you have a domain, you may find joining the domain with the net join command and an admin password from windows solves the problem.

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
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

hi Steven,
Thanks for ur timely response...i have attached my cifsclientconfigclient file herewith..kindly let me know if there are any changes..
Also i have created a user named root on my windows box with full permissions to it

..But still im unable to see the directory contents...

Instead of test-1 my actual hostname is seen there....c****1..security issue...
Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Hi boomer,

A quick thought:

> cifsmount -U administrator

Instead of administrator, can you try with Administrator (A in Caps).

Otherwise, as a quick test, can you just create a normal user on your PC and test it with cifsclient.
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

Hi rasheed,
i have used that option already suggested by steven..i created a user called root on windows box...but the same problem i m able to mount the dir on hp box..but not able to see the contents of those files..like
cat abd showing nothing....
Rasheed Tamton
Honored Contributor
Solution

Re: Cifsclient not able to view shared dir contents...

Hi,

I think the caps does not make any issue.
Can you do a
#cifsclient restart
and try with the cifsmount again

Just give us the correct error msg.

Rgds.
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

hi rasheed,
my problem is that i m not able to view the contents of the directory which i have shared from my windows box on my HP unix server...

# cifslist
Mounted Object Mountpoint State
-------------------------------------------------------------------------------
\\C-EDGE1\TMP /windowstest M
===============================================================================
Server Local User Remote User Domain State
-------------------------------------------------------------------------------
c-edge1 root administrator L


when i do cd /windowstest..it shows me all my 4 files of windows machine...
but when i do cat hi.txt it is blank....
i have created a user called root on my windows box with full permissions to it....and i also tried to mount by root user..but still problem persists....

restarted 4-5 times cifsclient...
Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Hi Boomer,

I could not find any problems on your cifsclient.cfg file, except

lookupTryNetbios = no;
lookupTryDns = no;

I think you have manually changed it no. Mine is yes. I have another another var called smbOverTcp
smbOverTcp = no;

My cifsclient is
CIFS-Client A.02.02.01 HP CIFS Client

My suggestion are:

- copy /opt/cifsclient/newconfig/etc/opt/cifsclient/cifsclient.cfg the file to /etc/opt/cifsclient/cifsclient.cfg and restart the cifsclient and test it.

-check your permissions again on the PC (including the advanced permissions for the user)

-Restart the PC and try it.

Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Another option to try is
/opt/samba/bin/smbclient //Test-1/tmp -U administrator

When you get smb prompt
smb: \> ls
smb: \> more yourfile.txt

See whether you can more on the file.

boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

hi Rasheed,
Actually we have an domain over here....is it required to add to ADS services of windows server...ifn yes then that has to bee done on my side...
Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Hi boomer,

We are also on a domain and I am using XP. I did not do anything special on the windows or cifsclient cofig file.

Why do not you try with the latest cifsclient.
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

hi Rasheed,
What do u mean by the latest cifsclient...?
Also when i create a file on my hp server i m able to view it on my windows machine but vice-versa is not happening..and my requirement is exactly that...
Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Please check your version - mine is
CIFS-Client A.02.02.01 HP CIFS Client

/etc/opt/samba/lmhosts
my.pc.ip pcname.domain.com.co pcname

The same I have put it on /etc/hosts
my.pc.ip pcname.domain.com.co pcname

&
In c:\WINDOWS\system32\drivers\etc dir
I have put the my
server.ip hostname
on hosts and lmhosts file.

Can you do a more from the smb> prompt as I asked above.
Eric Raeburn
Trusted Contributor

Re: Cifsclient not able to view shared dir contents...

Hello, boomer,

This is Eric in the HP CIFS Client software lab.

Let's be sure I understand the problem. You can mount, you can do 'ls' of the share, but when you 'cat' files on the share, that fails. Is that correct? That is a curious problem; I do not remember ever having seen it in the lab. Once you have successfully mounted and logged in, cat should work (using -U and -P with cifsmount effects a login, and your output from cifslist confirms the login succeeded).

I suggest the following troubleshooting steps to try to isolate the problem:

1. First verify that the files you are trying to cat are not binary files. A binary file might not contain printable characters, or could contain an escape sequence that causes a reset on the client.

2. If you have modified cifsclient.cfg, save it with another name, copy cifsclient.cfg.default to cifsclient.cfg, restart the cifsclient, and see if the problem goes away. My motivation for this suggestion is that you may have configured an invalid character mapping file for your system, or a Unicode setting that is incompatible with the server. If this does not fix it, look in cifsclient.cfg at the settings for caseConvertFile, clientCharMapFile, and serverCharMapFile, and ensure those files exist on your system. You could also run 'swverify B8724AA' to ensure these map files have not been corrupted. If the files are missing or you get an error from swverify, download the latest CIFS Client bundle from software.hp.com and reinstall (you do not need to remove the existing installation before reinstalling). Reinstallation may cause a reboot.

3. I none of the previous steps work, try mounting a share on another server. If the cat succeeds, that could indicate a permission problem on the first server, or some other type of incompatibility between the client and server. If the cat fails, then the problem is most likely on the CIFS Client.

4. Try creating another share on the problem server, and see if cat works on that share. If it does, that would be an even stronger suggestion of a permission problem on the first share.

5. Post your results here. If you cannot isolate the problem using these steps (or maybe some better troubleshooting techniques you devise), then the best bet is to file a support call with HP. They can advise you on how to enable the appropriate log levels in the CIFS Client, and from the logs we should be able to deduce the problem. They may even be able to diagnose a server problem without going through CIFS Client logging procedures.

Finally, are you familiar with any LAN tracing utilities, such as nettl, tcpdump, or ethereal? If the CIFS Client log does not help us, we may need to see a network trace. Support can help you install and run one of these tools.

Keep in touch; I am really curious about this.

-Eric

P.S. SEP, it is unadvisable to create a user named "root" on a Windows server. I believe we have a warning about this somewhere in the Admin Guide for the CIFS Client. The problem is, if the Windows and HP-UX systems have different individuals as administrators, and PAM-NTLM is used such that the Windows system performs authentication for the HP-UX system, then the administrator of the Windows system can become root on the HP-UX system, and change the root password, or do any other misdeed that comes to mind.
Eric Raeburn
Trusted Contributor

Re: Cifsclient not able to view shared dir contents...

boomer,

I found the problem. It is in your configuration file, at the end, where you have created an entry for the server c-edge1.

Because the server name contains a hyphen, the entire name must be quoted:

"c-edge1" = {
...etc...
};

This is actually a bug in the CIFS Client that was only recently discovered and so has not been documented yet.

Please confirm whether this fixes it.

-Eric
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

Hi Eric,
Even after changing "c-edge1"..the problem did not resolve..
Any changes have to be made from my windows side..plzz let me know...as i m able to view the files created on hp server on Windows machine...
But when i do cat test its blank..nothing at all...

Eric Raeburn
Trusted Contributor

Re: Cifsclient not able to view shared dir contents...

boomer,

Did you restart the cifsclient after placing the server name in quotes? Please try that if you have not already.

If the problem persists, then I request you follow the troubleshooting steps in my first message. Start with the default config file procedure. If that doesn't solve it, try the subsequent steps. Please post your results.

Good luck,
-Eric
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

hi Eric,
I am attaching the modifed configuration file in which i have just mentioned the server's ip ..
I tried ur idea no.1 of replacing default to cfg but it also didnt work....
Eric Raeburn
Trusted Contributor

Re: Cifsclient not able to view shared dir contents...

boomer,

The server entry at the end of your attached config file is invalid. Comment out the ipaddress as well. Why are you creating this entry in the first place? It is almost never needed.

Did you restart the cifsclient each time? Please ensure you do this. Overwrite cifsclient.cfg with cifsclient.cfg.default, do "cifsclient restart", do the cifsmount. If cifsmount succeeds, cat should succeed. If cifsmount succeeds and cat fails, please verify steps 1, 3, 4, 5 that I suggested above.

-Eric
Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Hi boomer,

You do not need to manually modify anything on that file. Please try with the default file. Just copy it and restart the cifsclient.

Rgds.
Peter Nikitka
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Hi,
some questions:
Do you get correct size information when performing a
ls -l /windowstest

What is the output of
wc /windowstest/yourfilename

mfG Peter
The Universe is a pretty big place, it's bigger than anything anyone has ever dreamed of before. So if it's just us, seems like an awful waste of space, right? Jodie Foster in "Contact"
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

Thanks Eric,Rasheed,Peter for helping me out...after replacing the cfg file with the original default one i was able to view my contents successfully.....thanks guys ur simply great..........Points given....
Rasheed Tamton
Honored Contributor

Re: Cifsclient not able to view shared dir contents...

Thanks boomer. But I had already suggested it and wonder why you did not try it before.

>copy /opt/cifsclient/newconfig/etc/opt/cifsclient/cifsclient.cfg the file to /etc/opt/cifsclient/cifsclient.cfg and restart the cifsclient and test it.

The one in newconfig dir and the one with default extension is the same file.

Regards,
Rasheed Tamton.
boomer_2
Super Advisor

Re: Cifsclient not able to view shared dir contents...

Hi Rasheed,
I m extremely sorry for that..but the next time i will make sure i follow each and every advice keenly..........