Operating System - HP-UX
1833325 Members
3129 Online
110051 Solutions
New Discussion

Re: Connection CIFS always exist after closing session ?

 
M. FRANGEUL
Advisor

Connection CIFS always exist after closing session ?

Bonjour,
J'utilise cifsclient A.01.08 sur un serveur hp-ux 11.00 pour acc??der une ressouce partag??e sur un serveur Windows 2000.

Lors de la connexion sur la platform hp-ux les utilisateurs sont connect??s automatiquement ?? la ressource partag??e gr??ce ?? une commande cifslogin dans leur .profile.

Le probl??me est que lorsque les utilisateurs ferment leur session sous hp-ux, la ressource CIFS est toujours presente.

Comment fermer la connection ?? la ressource windows automatiquement ?? la fermeture de la session utilisateur ?

Existe t-il un fichier lu au moment de l'exit dans lequel on peut mettre une commande cifslogout ?
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Connection CIFS always exist after closing session ?

Based on your title only.

The answer is no. There sould not be a process after the user has disconnected.

When a cifs/9000 user connects there is a sshd server process created which should terminate when the user disconnects.

See /etc/opt/samba/smb.conf for more information.

I also recommend getting current with CIFS. That would be A.01.09 for the client and A.01.10 for the server.

I sure hope your English is better than my French.

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
M. FRANGEUL
Advisor

Re: Connection CIFS always exist after closing session ?

Thanks for your answer SEP.

But your french is certainly better than my english.

Thanks again.
eric raeburn_1
New Member

Re: Connection CIFS always exist after closing session ?

The CIFS Client will not close its connection to a server until the last share on that server is unmounted. After you are sure no user is logged in, if you do:

umount

for each of the mounted shares at the server, the connection will be closed.

You could automate this with a shell script. First use "cifslist -S" to ensure the server is mounted, then use "cifslist -u" to ensure no users are still logged in, then use the output of "mount -p" to get the mountpoints on the server of type "cifs" to unmount. This last step is easier if you have configured

mtab = ""

in cifsclient.cfg (this option is not available in versions prior to A.01.09).

Good luck. Please post if you have further questions or any problems with this solution.
Steven E. Protter
Exalted Contributor

Re: Connection CIFS always exist after closing session ?

My experience is that a connection to a CIFS share, whether it be via a Windows or HP client will stay current until terminated by the client or the server.

My original answer refers to the server side smbd server process.

A smbd process is created every time a cifs client connects to a share. That is one process per connection. This server process can be connected in one of two ways:

1)User disconnect
2)Stopping the Samba server /sbin/init.d/samba stop

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
eric raeburn_1
New Member

Re: Connection CIFS always exist after closing session ?

I believe M. Frangeul's inquiry is about the CIFS Client, specifically, that after the last "cifslogout" the Client still has a connection open to the server. In other words, cifslist shows the share and the mountpoint, and no logged-in users. Let's wait for his response.