cancel
Showing results for 
Search instead for 
Did you mean: 

Samba question ( sort of ?)

Krishna Prasad
Trusted Contributor

Samba question ( sort of ?)

Hello - I know this is the Linux forum, but I figured most of the Linux folks know samba as well as any.

I have an HP-UX samba server with a share setup.

I can access it via a WIN 2K client, however when I automatically try to mount it a startup bat file the network isn't quite ready enough to mount the drive.

Does anyone have any tricks or suggestions to time this correctly?
Positive Results requires Positive Thinking
9 REPLIES
Steven E. Protter
Exalted Contributor

Re: Samba question ( sort of ?)

I use CIFS/9000 on HP-UX and Samba on Linux, pretty much the same way.

I set up my W2K client to connect to share as follows:

search for the Samba box in network neighborhood.

I click in(I am challenged for a user id and password), right mouse on the share I want, choose map network drive. I click the box that says connect at logon.

Pretty much I'm done.

Something that causes some issues is if the Linux box isn't fully integrated into the network, or initial setup.

smbpasswd -a has to be done on the Linux box for the account you've set up for access to the shares.

Then unix permissions control the level of access based on username.

SEP

I
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
Krishna Prasad
Trusted Contributor

Re: Samba question ( sort of ?)

My HP-UX box is my samba server and I use CIFS when I need HP-UX as a client.

I have tried the reconnect at reboot option and it always fails on reboot. I think it has something to do with the timing of the network services availability. ( Error message says Network path not found. )

When the machine finishes booting I can then map the share.
Positive Results requires Positive Thinking
Steven E. Protter
Exalted Contributor

Re: Samba question ( sort of ?)

I understand ron.

Take the mount requests out of /etc/fstab

Write a little script that runs the cifs mounts.

Make it the last item in Run Level 2.

Example

/sbin/init.d/mountcifs # runs the mount requests.

ln -s /sbin/init.d/mountcifs /sbin/rc2.d/S995mountcifs

Have the Kill link at run level 1.

Because CIFS uses the network, it can't mount before the network.

Though now that I think of it, nfs doesn't have this problem. Perhaps the nfs.client script reads through /etc/fstab and does the mounts itself.

You are making me think Ron. ....

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
Krishna Prasad
Trusted Contributor

Re: Samba question ( sort of ?)

You are 100% when working with a HP-UX client.
My problem is when automatically mounting/map on a Windows 2K client.

The PC attaches to Novel and can map Novell share fine. However when I map my samba drive it fails. When it finishes booting it is fine.

I will try to do a generic loop in my .bat file to keep trying the mount/map. The goal is to have this happen automatic.

WIN 2K also fails when I try the reconnect on reboot.
Positive Results requires Positive Thinking
Steven E. Protter
Exalted Contributor

Re: Samba question ( sort of ?)

This problem usually occurs when the server is not fully integrated from the samba standpoint into the network.

Add a user account for each Unix machine to the Primary Domain Controller and see if that helps. I do this at home and work. I am challenged for a passowrd, but its still working.

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
Krishna Prasad
Trusted Contributor

Re: Samba question ( sort of ?)

It doesn't log into a Windows Domain. It logs into the local PC and Novell. I am testing on my pc 2K client. I will be mounting the shares on a Windows 2K server and need to have the shares mapped without any password prompts.

I should be able to add the Unix/Samba server to the Domain on the Windows 2K server when I begin testing on the Server.

I am currently using the user guest.
I know I have the correct security settings becuase once my pc is completed booted I have no trouble mounting the shares without being prompted for a password.
Positive Results requires Positive Thinking
Wouter Jagers
Honored Contributor

Re: Samba question ( sort of ?)

Is your w2k in the same 'workgroup' as the one defined in your smb.conf ?

Also, did you configure your .bat file as your user's logon script, or did you put it in the 'Startup' folder ? We map all our HPUX samba shares through our logonscripts, without many problems.

Also make sure nmbd is running on your server, I suspect w2k from caching a whole lot, so who knows..
an engineer's aim in a discussion is not to persuade, but to clarify.
Steven E. Protter
Exalted Contributor

Re: Samba question ( sort of ?)

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x6c229607df6ed711abdc0090277a778c,00.html

That post has two links with documents that might help.

Still pretty thin.

This is a toughie.

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
Krishna Prasad
Trusted Contributor

Re: Samba question ( sort of ?)

I have solved my problem by using the /PERSISTENT:NO flag on the net use command to get around Windows 2K automatically trying a reconnect before all the network options are available.

I put a .bat file in the startup for the user that does a net use command. Then checks if the drive is there, if not do a little loop and try again.

It also helped putting a hosts file on the 2K server with entries to the samba servers.
Positive Results requires Positive Thinking