The user is stuck in 1s 8.3, how to disable it. Easy ways to disconnect users. The most radical way to interrupt sessions

— 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 the old ones typical 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, since certain fields are filled in when setting up, 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
  • Authentication operating system– 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)
  • Language – Russian
  • [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 is basic rights to access the program entrance. 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 the configuration supports it). 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 - the Administration tab, on the left Active users (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:


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 the arsenal to perform 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 if you forcefully end your session, you may lose data. 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 eight, 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

Appearance processing is presented in Fig.2.

Features of this processing:

  1. Checking and 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 full list 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 manage 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.

To carry out routine maintenance in information base 1C:Enterprise 8 often requires 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, you may need to provide a login/password account information base administrator.

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 "Block" option. routine tasks"on".

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.

1. Disabling users in the file version of 1C 8.

To disconnect users in the file version I created a *.bat file with one line

net session /delete /y

It disables all open shared files on the computer on which the database is located.
Next, I created a task (Windows Task Scheduler) that would launch this file at the appointed time.
You may ask, what about those sessions that are open on the computer? I also eliminated them by creating a new *.bat file with the line

taskkill /IM 1cv8.exe /f
True, it disables all running 1C on the current computer, but for me it was not so scary since the archiving was done at night and no one was working in the database, this batch file can also be added to the Windows Scheduler.

2. Disabling users in the client-server database.

Just like in the case of a file database, I used *.bat files.
I created two *.bat files, the first one disables the 1C Enterprise server, the second one turns it on very simply.

net stop "1C:Enterprise 8.2 Server Agent"

net start "1C:Enterprise 8.2 Server Agent"

Added two new tasks to the Windows scheduler, with a time difference of 15 minutes so that all frozen users can disconnect, these actions are similar to Starting the 1C Enterprise server and Stopping the 1C Enterprise server

3. Software method disconnecting users in 1C

The task was to perform archiving daily at 22:30.
In this method, I didn’t bother, I created a new role “NeClose1C”.
Created a new procedure in a regular application module:

Procedure ShutdownUsers() Export If NOT RoleAvailable("Do Not Close 1C") Then If Hour(mop_PerformingOperationsOnServer.CurrentDateOnServer()) >= 22 Then // get the time on the server StopSystemOperation(False); endIf; endIf; End of Procedure

If NOT RoleAvailable("Do Not Close 1C") Then If Hour(mop_PerformingOperationsOnServer.CurrentDateOnServer()) >= 22 Then // get the time on the server StopSystemOperation(False); endIf; endIf;

ConnectWaitHandler("ShutdownUsers", "600");

Function current date on the server it looks like this:

Function CurrentDateOnServer() Export
Return CurrentDate();
EndFunction

This way we get the date on the server if in the properties common module The "Server" checkbox is checked, I only checked it.

It turns out that the current code cuts off users for two hours, but usually after midnight no one logs into the database.

If this article helped someone, I will be very happy.

Problems