How to kick users out of the database. Terminating user sessions, how it works, what it does How to kick a user out of 1s 8.3

To carry out routine maintenance in the 1C:Enterprise 8 information base, it is often necessary to obtain exclusive access to the database. For example, to perform a database backup or perform routine maintenance on the DBMS server (re-indexing, etc.), you must disconnect all active sessions.

Let's look at a simple way to disconnect users from an infobase using the standard functionality of the 1C:Enterprise server.

Standard functionality

Let me make a reservation right away that we will be talking about the client-server version of 1C:Enterprise 8. To disable sessions, let’s go to the server administration console. There we will find the required information base in the list:

By going to the information security properties, set the option “Session start blocking is enabled.” In this case, it may be necessary to enter the login/password for the infobase administrator account.

Don't forget to set the session lock period. You should also ensure that all background jobs must be stopped while sessions are blocked. This is done using the “Blocking of routine tasks is enabled” option.

If necessary, you can set the text of the message to users to whom they will be notified 5 minutes before sessions are blocked, as well as the permission code for entering the infobase during the session blocking period.

The permission code can be used to log into the infobase to perform routine maintenance while other sessions are inactive. You need to enter the permission code when connecting to the database using the parameters. For example, this is what the parameter passed to the server will look like if the permission code is "123456".

By logging into the database in this way, we will receive exclusive access to the information base. Other sessions will not be able to join us.

The notification to the user that sessions are blocked looks like this (depending on the message entered by the administrator). It appears every minute 5 minutes before the blocking period.

When the session blocking period begins, a notification appears first:

Afterwards the session ends.

Active sessions can also be disabled by removing them from the list of active sessions. This action is sometimes necessary to terminate hung sessions.

In practice, it is better to communicate about user disconnections in advance to reduce the risk of losing data entered by users but not yet saved.

The need to forcefully shut down a user mainly arises in the following cases:

  • Updating the information base;
  • Adding a new metadata object to the configuration;
  • Carrying out preventive and repair work on the server;
  • A hung user session is preventing the application from restarting.

In this article we will try to tell you how to end a user session, what tools an administrator has in his or her arsenal to complete this task, which termination options are provided by the file version and which by the client-server version of 1C.

It is important to remember that forcefully terminating a session may result in data loss. So, to avoid unpleasant situations, it is advisable to warn users in advance about the disconnection.

Closing sessions from the configurator

When changes are made to the database structure, dynamic configuration updates are no longer available. And an information window appears on the screen (Fig. 1).

The sequence of actions in this case is obvious:

  1. You must click the “End sessions and repeat” button;
  2. Wait for the database restructuring window;
  3. Click "OK".

It should be noted that changes made to the program code do not require users to shut down, but they will not work on that device without restarting the application on each specific computer.

Ending sessions directly from the program

Most standard 1C products, version 8, have a mechanism that allows you to easily terminate a user's work remotely and provide the administrator with exclusive access to the database. This is the “Blocking connections to infobase” processing.

You can find it at one of two addresses:

  1. In one of the submenus of the “Service” section;
  2. Going to the Operations->Processing section.

Fig.2

The appearance of the processing is shown in Fig. 2.

Features of this processing:

  1. Checking or unchecking the box and clicking the Record button turns user blocking on and off, deleting sessions and preventing new connections from being created;
  2. The blocking end time cannot be empty or less than its start time;
  3. If the “Permission code” parameter is specified, it can be entered into the startup line to ignore the blocking by specifying “/UC” before the code;
  4. If you do not specify the “Permission Code”, then it will be problematic to get into the database before the blocking period expires (in the file version of work, you can try to delete the 1CVcdn file from the database folder);
  5. If instead of the parameter “/UC” and a password separated by a space, you specify “/CAllow Users to Work”, where C is Latin, you can completely disable blocking for all users;
  6. Clicking the “Active Users” button opens a window with a complete list of users (Fig. 3), from where you can open the “Registration Log” or end the session of each specific user.

Fig.3

The two options above work fine in both file and client-server mode. Further we will consider cases typical only for server work.

Removing users from rdp

It is important to remember that disconnecting user sessions from servers is only possible if you have certain rights to do this.

When working from a remote desktop, you can end user sessions using the standard task manager. Simply interrupting sessions is a little incorrect, but quite effective.

The second option is to use the task manager - remote connection with the ability to control each specific session and exit the program according to all the rules. This method is long, and no one guarantees that while one user is logging out, the program will not be launched by any other worker.

Removing users via the server console

Having Administrator rights for a 1C server cluster, you must:


Very often, when working in server mode, hung user sessions are not visible through the platform tools; they can only be deleted through the console.

The most radical way to interrupt sessions

A situation where the above methods do not work is extremely rare. But if it occurs, there is another radical way to interrupt connections to the database: physically reboot the server.

Of course, users who did not have time to finish their work and save the data will be extremely outraged by such a shameless attitude, but it is fast and it is extremely effective.

Hello Dmitry! Please teach me how to force users out of the database in order to update the configuration. Thanks in advance.

From the user: Svetlana Nikolaevna

Hello, Svetlana Nikolaevna!

In order to kick users out of the database, you must have administrator rights.

Go to the section Administration, Support and Maintenance:

Choose Blocking users:


From the form, click the button to view a list of active users.

We fill out the message that users will see on their screens, set the blocking interval (if you don’t know the end time, leave the field empty). Install also unlock code, because the blocking will also affect your active session, for example, install 1234 .

Click Set blocking. A warning message appears:


We agree. Now the form says in red that the blocking will begin soon.


At this time, active users will see the following window:


Closer to the beginning of the blocking, it begins to appear every minute:


The user needs to complete his work in the program and exit. If it does not exit on its own, the program will close automatically. When trying to log into the database, the user will receive the following warning:


The user who has set the block also receives a message:


Let's leave the base.

Because the blocking applies to all sessions of all users, we will need to set the launch parameter (this is where we need Unlock code):



On the second tab we specify the database launch parameter (where 1234 is our code):


Click ready. Now we can enter both the configurator and the user mode.

To unblock the database, you need to return to the blocking form and click Unlock.


If the blocking end date has been set, then when it occurs, the blocking will stop automatically.

— Vasya, starting from today you are creating users!
- But I’m a programmer, not a system administrator?!
— System administrators don’t know 1C, so you will create users!
- Aaaah!!!

A programmer is a person who writes programs for a computer. However, managing the list of users in 1C is usually entrusted to someone associated with 1C, namely a 1C programmer.

In principle, some programmers are not against it, since it gives them some “privileges”.

Nevertheless, the list of users in 1C differs little from the lists of users in other programs. Therefore, creating a new user or disabling an existing one is as easy as shelling pears.

1C users

So, 1C has its own list of users. It is used to regulate access to the 1C database. When entering the database, 1C will ask you to select a user from this list and enter a password.

There are options in which 1C does not ask for a username to log in. However, this doesn’t mean anything at all . It’s just that in this case, the user from the list is mapped to a Windows/domain user and is detected automatically. How

The only option when 1C does not really prompt the user is when creating a new (empty) database. In this case, the list of 1C users is empty. Until the first user is added, 1C will log in automatically. A similar system is used in Windows when there is one user without a password.

1C users differ from each other:

  • Access rights
  • Interface (presence of items in the menu).

There is no “superuser” or “administrator group” as such. An administrator is a user who has all configuration rights and administration rights enabled. In an empty database (when the list of users is still empty), this particular user should be added first.

Two lists of 1C users

In fact, 1C has two lists of users. One of them (the list of 1C users) is “real” from the programmer’s point of view. It's in the configurator. It is by this that 1C identifies the user.

This is the approach of old standard configurations (for example, trade management 10, accounting 1.6, etc.) - users are edited in this list, and are automatically included in the user directory upon first login.

The second (users of version 1C 8.2, “not real”) is the users directory (and the external users directory, as in UT 11). The directory existed before, but the approach of the new standard configurations is that users are added to it, and are automatically included in the “real” list.

The main problem with this approach is that those who don’t like working this way and want to do it the old way can’t do it, because when you create it, certain fields are filled in, and if you add a user to the list, they won’t be picked up automatically in the directory.

How to add a user to the list of 1C users

So, the list of 1C users is in the configurator. and open the Administration/Users menu.

To add a user, you must press the add button (or Ins from the keyboard). If the list is now empty, then the first user must have administrative rights (see below).

  • Name – user name (which he will choose when logging into 1C)
  • Full name - reference full name, does not appear anywhere
  • Password
  • Show in selection list
    o if the checkbox is checked, the user will be in the selection list when logging into 1C
    o if the checkbox is not checked, then the user will not be in the selection list (that is, you cannot select), but you can enter his name from the keyboard and log in
  • Operating system authentication – can be associated with a Windows/domain user and this user will not need to enter a password (will log in automatically).

On the Other tab, you select rights and basic user settings.

  • The main interface is a menu that will be available to the user (used only in the thick client)
  • Russian language
  • [Main] Launch mode - thick or thin client, using this parameter you can enter the configuration of the thin client - thick and vice versa
  • Available roles (user rights).

User rights in configurations are usually divided into blocks (“roles”). In the approach of the old configurations, they were broken down by user position (cashier, manager, etc.). This approach has a disadvantage - since in different organizations the cashier and the manager may have different functions.

Therefore, in the approach of the new configurations, they are broken down by action (access to the end of the month, access to cash transactions). That is, for each user a set of operations is set.

In both cases there are basic access rights to enter the program. In the old approach it's:

  • User
  • Full Rights (for administrator).

In the new approach it is:

  • Basic Rights
  • BasicRightsUT
  • LaunchThinClient – ​​plus LaunchXxxClient for launching others
  • SubsystemХхх – a check mark for each subsystem (tab in the interface) that the user needs
  • Full Rights (for the administrator, not Administration!).

PS. For external users, basic rights are not required.

How to add a 1C user - 1C 8.2 users

The list of 1C 8.2 users in the new version is located in 1C (in 1C Enterprise mode), in the Users and External Users directories (only if supported by the configuration). The difference is that you must create users not in the configurator, but in this directory, and they will get into the configurator automatically.

If you are using a thin client, then see the Administration desktop tab. Otherwise, open the Users directory, for example, through the Operations menu.

Click the Add button (or Ins from your keyboard). To be able to manage the list of users, you must have Full Rights enabled.


Unlike the first approach, here you do not directly indicate each right (role) to the user, but indicate groups of rights (user groups).

The User Groups directory contains a profile that defines a set of rights (roles). In the User Group Profiles directory, you can change or add such sets of rights (roles).

1C user settings

In some configurations (especially in the old approach configurations) it is not enough to create a user. Additionally required:

  • Log in as a user for the first time
  • After that, find the user in the user directory
  • In the directory form, click (options “or”)
    o Menu Go/User Settings
    o Menu Additional Information/User Settings and Advanced User Rights
    o In some configurations this is a sign directly on the user form
    o In some configurations, the global menu of the program Tools/User Settings
  • Configure additional settings/user rights that determine auto-filling of fields and some accesses.

How to disconnect a 1C user

[Temporary] user disconnection is not provided in most configurations. Here are variations that can be used to achieve this result.

Configurations of the old approach (via the configurator):

  • Delete user
  • Change password
  • Remove the User role (will not be able to log in).

New Approach Configurations (via Enterprise):

  • Uncheck Access to information. database allowed
  • Change password
  • Remove from all access groups.

Active 1C users

1C allows you to find out the list of users who are currently in the database.

To do this, in Enterprise mode, select the Tools/Active Users menu (thick client, administrative interface). In the thin client - Administration tab, Active users on the left (may be in See also).

In Configurator mode, select the Administration/Active Users menu.

Disabling 1C users

As you know, in order to update the database (configuration) it is necessary that all users log out of 1C (not in all cases, but often required).

Users don’t like to leave (this is a fact). And if you ask them over the phone, they will definitely log in again within 30 seconds. When there are 200 users, it becomes a very fun event.

Therefore, there are three ways to disconnect users from 1C: