Stopping and restarting CIFS sessions

Ways to stop CIFS sessions

If you want to stop CIFS sessions for all clients or for a single client, do one of the following:

Disconnecting users with Server Manager

To stop CIFS sessions with Server Manager, follow these steps.

Step Action
1 Open Server Manager by choosing it from the Start menu.
2 From the Server Manager Computer menu, choose Select Domain.
Result
The Select Domain window opens.
3 In the Select Domain window, select the filer you want by typing its UNC name, for example, \\FILERNAME, in the Domain field, then clicking OK.
Result:
A Server Manager window for the filer appears.
4 In the Server Manager window, double-click the name of a filer.
Result:
The Properties window for the filer appears.
5 Click Users.
Result:
The User Sessions window appears.

6 To disconnect one or more users, do one of the following:
  • To disconnect a single user or selected users, select them, then click Disconnect.
  • To disconnect all users, click Disconnect All.
Result:

The selected users are disconnected.


Note: If at least one of the selected users has open resources, an alert box appears for you to confirm or cancel your command.


Using the cifs terminate command

You can stop CIFS service for a specific client or shut down CIFS service from the filer by using the cifs terminate command. Always terminate all CIFS sessions before you reboot or turn Off the filer.

You can specify a single client or all clients, and the time delay, in minutes, before the CIFS sessions are terminated, as shown in the following command syntax:

cifs terminate [client] [[-t] time]
Variable Description
client Name of the client for which you are ending a CIFS session.
time Number of minutes before the termination happens.

The cifs terminate command not persistent

The cifs terminate command disables CIFS sessions only between the time you enter the command and the next reboot. After each reboot, if your filer is licensed and configured to run CIFS, the filer automatically starts CIFS service. If you want to prevent CIFS from restarting after a reboot, remove the /etc/cifsconfig.cfg file from the filer or rename the file.

Time delay

You can delay the termination of CIFS service after you enter the cifs terminate command.

Default time delay

The default time delay is five minutes.

Changing the time delay

When you use the -t option, the command counts down from the time specified.

Canceling the cifs terminate command

If you want to cancel the cifs terminate command, press Ctrl-C before the end of the countdown.


Note: The halt command automatically invokes the cifs terminate command.



Caution: The reboot command also stops CIFS service; however, it does not provide a time delay during which users can save their open files before the disconnect. Changes that have not been saved to disk are lost if the CIFS client has an open file when it is disconnected from the filer.


Examples of the cifs terminate command

Here are some examples of the cifs terminate command.

Terminating CIFS service for all users on the filer

To terminate CIFS service for all users on the filer after 10 minutes, enter the following command:

cifs terminate -t 10 

The cifs terminate command displays an alert message on CIFS clients that warns them of the pending shutdown of CIFS service.


Note: Windows 95 and Windows for Workgroup clients must have the WinPopup program configured before they can display the alert message.


Console display

Here is the display for cifs terminate when you do not specify a time:

cifs terminate
There are currently 35 CIFS users that have 37 open files
Disconnecting while files are open may cause data loss!!
How many minutes should I wait? [5]:
minutes left 4
minutes left 3
minutes left 2
minutes left 1
CIFS shutting down
Terminating a CIFS session for a specific client

To terminate a CIFS session for a particular client, specify the name of the computer in the command. For example, the following command terminates a CIFS session for a computer named PETERSPC after 10 minutes:

cifs terminate PETERSPC -t 10

Using the cifs restart command to restart CIFS service

To restart CIFS service, use the cifs restart command, as follows:

cifs restart
CIFS server is registering...
CIFS server is running.

Copyright © 1999, Network Appliance, Inc. All rights reserved.

Part No. 210-02334
File: cifs28.htm
Last updated: 04/26/99 08:11:33