diff --git a/csv/hash_list.csv b/csv/hash_list.csv index 31f9bae..e193915 100644 --- a/csv/hash_list.csv +++ b/csv/hash_list.csv @@ -1,16 +1,16 @@ hash_algoritm;hash_description -des;DES (Алгоритм для симметричного шифрования) -md5;MD5 (128-битный алгоритм хеширования) -yescrypt;yescrypt (Криптографическая хэш-функция) -gost-yescrypt;GOST-YESCRYPT (Конструкция согласно ГОСТ Р 34.11─2012) -scrypt;scrypt (Адаптивная криптографическая функция формирования ключа) -bf;Blowfish (Алгоритм блочного симметричного шифрования) -bcrypt;bcrypt (Адаптивная хеш-функция из семейства алгоритмов Blowfish) -bcrypt-a;bcrypt-a (Адаптивная хеш-функция из семейства алгоритмов Blowfish) -sha512crypt;SHA512 (Хеш-функция из семейства алгоритмов SHA-2) -sha256crypt;SHA256 (Хеш-функция из семейства алгоритмов SHA-2) -!sunmd5;Sun MD5 (Хеш-алгоритм от Sun Microsystems) -md5crypt;MD5 Unix (Хэш-алгоритм вызывает тысячу раз стандартный MD5) -!bsdicrypt;Extended DES Crypt (Хеш-функция из семейства алгоритмов DES от BSDi) -descrypt;descrypt (Хеш-функция из семейства алгоритмов DES) -!nt;NTHash (Хеш-функция из семейства алгоритмов NT Windows) \ No newline at end of file +des;DES (Algorithm for Symmetric Encryption) +md5;MD5 (128-bit hashing algorithm) +yescrypt;yescrypt (Cryptographic hash function) +gost-yescrypt;GOST-YESCRYPT (Design according to GOST R 34.11─2012) +scrypt;scrypt (Adaptive cryptographic key generation function) +bf;Blowfish (Symmetric Block Cipher Algorithm) +bcrypt;bcrypt (Adaptive hash function from the Blowfish family of algorithms) +bcrypt-a;bcrypt-a (Adaptive hash function from the Blowfish family of algorithms) +sha512crypt;SHA512 (Hash function from the SHA-2 family of algorithms) +sha256crypt;SHA256 (Hash function from the SHA-2 family of algorithms) +!sunmd5;Sun MD5 (Hash algorithm from Sun Microsystems) +md5crypt;MD5 Unix (Hash algorithm calls standard MD5 thousand times) +!bsdicrypt;Extended DES Crypt (Hash function from the BSDi family of DES algorithms) +descrypt;descrypt (Hash function from the DES family of algorithms) +!nt;NTHash (Hash function from the NT Windows family of algorithms) \ No newline at end of file diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 1dc287a..d92d948 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -8,6 +8,11 @@ include_directories(${GTK_INCLUDE_DIRS}) link_directories(${GTK_LIBRARY_DIRS}) add_definitions(${GTK_CFLAGS_OTHER}) +pkg_check_modules(VTE291 REQUIRED vte-2.91) +include_directories(${VTE291_INCLUDE_DIRS}) +link_directories(${VTE291_LIBRARY_DIRS}) +add_definitions(${VTE291_CFLAGS_OTHER}) + find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) if(WEBKIT_LIBRARIES_FOUND) @@ -74,12 +79,15 @@ set(SOURCE_FILES set(LIBRARIES ${GTK_LIBRARIES} + ${VTE291_LIBRARIES} ublsettings ublsettings-gtk3 ublsettingsui-gtk3 pthread) +add_definitions(-DVTE_INCLUDE) + add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C}) target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBRARIES}) diff --git a/source/ubl-settings-usergroups.c b/source/ubl-settings-usergroups.c index 529b412..bcb9bd3 100644 --- a/source/ubl-settings-usergroups.c +++ b/source/ubl-settings-usergroups.c @@ -74,7 +74,7 @@ void yon_interface_update(main_window *widgets){ } if(!strcmp(parameters[0],"x")) parameters[0]=""; - if (parameters_size>1&&!strcmp(parameters[1],"x")) parameters[1]=AUTOMATICALLY_LABEL; + if (parameters_size>1&&!strcmp(parameters[1],"x")) parameters[1]=""; if (parameters_size>2&&!strcmp(parameters[2],"x")) parameters[2]=login; char *pars = ""; if (parameters_size>5&&strcmp(parameters[5],"x")&&strcmp(parameters[5],"")){ @@ -92,10 +92,10 @@ void yon_interface_update(main_window *widgets){ gtk_list_store_set(widgets->UsersList,&iter, 2,login, 3,parameters_size>0?parameters[0]:"", - 1,parameters_size>1&&!yon_char_is_empty(parameters[1])?parameters[1]:AUTOMATICALLY_LABEL, + 1,parameters_size>1&&!yon_char_is_empty(parameters[1])?parameters[1]:"", 4,parameters_size>2&&!yon_char_is_empty(parameters[2])?parameters[2]:login, 5,parameters_size>3?!strcmp(parameters[3],"x")||!strcmp(parameters[3],"")?def_groups:parameters[3]:def_groups, - 6,parameters_size>4?!strcmp(parameters[3],"x")?"":parameters[4]:"", + 6,parameters_size>4?!strcmp(parameters[4],"x")?"":parameters[4]:"", 7,pars, -1); if(parameters) @@ -118,13 +118,29 @@ void yon_interface_update(main_window *widgets){ login = yon_char_divide_search(parameters[0],"=",-1); login[strlen(login)-1]='\0'; } - if (!strcmp(parameters[1],"x")) parameters[1]=AUTOMATICALLY_LABEL; + if (parameters_size>2&&!strcmp(parameters[2],"x")){ + parameters[2]=""; + } + if (!strcmp(parameters[1],"x")) parameters[1]=""; + char *pars=""; + if (parameters_size>3&&strcmp(parameters[3],"x")&&strcmp(parameters[3],"")){ + + if (!check_is_password_hash(parameters[3])){ + pars = ENCRYPTED_LABEL; + } else { + pars = UNENCRYPTED_LABEL; + + } + } else { + pars = PASSWORD_NO_SET_LABEL; + + } gtk_list_store_set(widgets->GroupsList,&iter, 1,login, 0,parameters_size>1?parameters[1]:"", 2,parameters_size>0?parameters[0]:"", 3,parameters_size>2?parameters[2]:"", - 4,parameters_size>3?ENCRYPTED_LABEL:DEFAULT_USER_LABEL, + 4,pars, -1); if(parameters) free(parameters); @@ -222,6 +238,22 @@ void yon_hide_passwords(template_saving_window *window){ } } if(!yon_char_is_empty(old_value)){ + config_str parsed = NULL; + parsed = yon_char_parse(old_value,&size,":"); + if (size>5&&!yon_char_is_empty(parsed[5])&&strcmp(parsed[5],"x")&&parsed[5][0]!='%'&&parsed[5][1]!='%'){ + free(old_value); + free(parsed[5]); + parsed[5]=yon_char_new("*******"); + old_value = yon_char_parsed_to_string(parsed,size,":"); + } else if (size>5&&!yon_char_is_empty(parsed[5])&&strcmp(parsed[5],"x")) { + free(old_value); + free(yon_char_divide(parsed[5],1)); + old_value = yon_char_parsed_to_string(parsed,size,":"); + } + if (parsed){ + yon_char_parsed_free(parsed,size); + } + old=yon_char_unite("",old_value,"",NULL); } if(!yon_char_is_empty(new_value)){ @@ -244,6 +276,21 @@ void yon_hide_passwords(template_saving_window *window){ new_value = yon_char_parsed_to_string(parsed,size,":"); } if(!yon_char_is_empty(old_value)){ + config_str parsed = NULL; + parsed = yon_char_parse(old_value,&size,":"); + if (size>4&&!yon_char_is_empty(parsed[4])&&strcmp(parsed[4],"x")&&parsed[4][0]!='%'&&parsed[4][1]!='%'){ + free(old_value); + free(parsed[4]); + parsed[4]=yon_char_new("*******"); + old_value = yon_char_parsed_to_string(parsed,size,":"); + } else if (size>4&&!yon_char_is_empty(parsed[4])&&strcmp(parsed[4],"x")) { + free(old_value); + free(yon_char_divide(parsed[4],1)); + old_value = yon_char_parsed_to_string(parsed,size,":"); + } + if (parsed){ + yon_char_parsed_free(parsed,size); + } old=yon_char_unite("",old_value,"",NULL); } if(!yon_char_is_empty(new_value)){ @@ -260,12 +307,21 @@ void yon_hide_passwords(template_saving_window *window){ free(yon_char_divide(new_value,1)); newv=new_value; } else if (!yon_char_is_empty(new_value)&&new_value[0]=='$') { - newv=new_value; + if (main_config.load_mode){ + newv=new_value; + } else { + newv="*******"; + } }else if (!yon_char_is_empty(new_value)){ newv="*******"; } if (!yon_char_is_empty(old_value)){ - old = yon_char_unite("",old_value,"",NULL); + if (main_config.load_mode){ + + old = yon_char_new("*******"); + } else { + old = yon_char_unite("",old_value,"",NULL); + } } char *new_string = yon_char_unite(!yon_char_is_empty(old)?old:"","\n",!yon_char_is_empty(newv)?newv:"",NULL); gtk_list_store_set(window->list,&iter,7,new_string,-1); @@ -277,12 +333,20 @@ void yon_hide_passwords(template_saving_window *window){ free(yon_char_divide(new_value,1)); newv=new_value; } else if (!yon_char_is_empty(new_value)&&new_value[0]=='$') { - newv=new_value; + if (main_config.load_mode){ + newv=new_value; + } else { + newv="*******"; + } }else if (!yon_char_is_empty(new_value)){ newv="*******"; } if (!yon_char_is_empty(old_value)){ - old = yon_char_unite("",old_value,"",NULL); + if (main_config.load_mode){ + old = yon_char_new("*******"); + } else { + old = yon_char_unite("",old_value,"",NULL); + } } char *new_string = yon_char_unite(!yon_char_is_empty(old)?old:"","\n",!yon_char_is_empty(newv)?newv:"",NULL); gtk_list_store_set(window->list,&iter,7,new_string,-1); @@ -296,8 +360,60 @@ void on_config_save(GtkWidget *self, main_window *widgets){ yon_samba_sync_proceed(); template_saving_window *window = yon_save_proceed(NULL,YON_CONFIG_BOTH,"users", "DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERSHADOW[*] GROUPADD[*]",NULL); if (window){ - yon_hide_passwords(window); - g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_save_window_close_update),widgets); + if (main_config.load_mode==0){ + GtkTreeIter iter; + int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&iter); + for(;valid;valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&iter)){ + char *parameter,*old_value, *new_value; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,1,¶meter,2,&old_value,3,&new_value,-1); + int old_size, new_size; + config_str old_parsed = yon_char_parse(old_value,&old_size,":"); + config_str new_parsed = yon_char_parse(new_value,&new_size,":"); + if (old_parsed&&new_parsed){ + char *parameter_type = yon_char_divide_search(parameter,"[",-1); + if (!strcmp(parameter_type,"USERADD")){ + if (old_size>5){ + old_parsed = yon_char_parsed_rip(old_parsed,&old_size,5); + + } + if (new_size>5){ + new_parsed = yon_char_parsed_rip(new_parsed,&new_size,5); + } + char *old_final = yon_char_parsed_to_string(old_parsed,old_size,":"); + char *new_final = yon_char_parsed_to_string(new_parsed,new_size,":"); + if (!strcmp(old_final,new_final)){ + gtk_list_store_set(window->list,&iter,5,0,-1); + } + free(old_final); + free(new_final); + yon_char_parsed_free(old_parsed,old_size); + yon_char_parsed_free(new_parsed,new_size); + + } else if (!strcmp(parameter_type,"GROUPADD")){ + if (old_size>3){ + old_parsed = yon_char_parsed_rip(old_parsed,&old_size,3); + + } + if (new_size>3){ + new_parsed = yon_char_parsed_rip(new_parsed,&new_size,3); + } + char *old_final = yon_char_parsed_to_string(old_parsed,old_size,":"); + char *new_final = yon_char_parsed_to_string(new_parsed,new_size,":"); + if (!strcmp(old_final,new_final)){ + gtk_list_store_set(window->list,&iter,5,0,-1); + } + free(old_final); + free(new_final); + yon_char_parsed_free(old_parsed,old_size); + yon_char_parsed_free(new_parsed,new_size); + + } + } + } + } else { + yon_hide_passwords(window); + g_signal_connect(G_OBJECT(window->Window),"destroy",G_CALLBACK(on_save_window_close_update),widgets); + } } } @@ -452,6 +568,50 @@ void yon_delete_confirmation_save(GtkWidget *self, dictionary *dict){ on_subwindow_close(self); } +void yon_group_delete_confirmation_save(GtkWidget *self, dictionary *dict){ + GtkTreeIter iter,itar; + main_window *widgets = yon_dictionary_get_data(dict->first,main_window*); + yon_confirmation_window *window = yon_dictionary_get_data(dict->first->next,yon_confirmation_window*); + int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->GroupsList),&iter); + for (;valid;valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->GroupsList),&iter)){ + char *name; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->GroupsList),&iter,2,&name,-1); + int valid2 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itar); + for (;valid2;valid2 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itar)){ + char *name_check; + int status,delete; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itar,0,&delete,1,&name_check,-1); + if (!strcmp(name,name_check)&&delete){ + gtk_list_store_remove(widgets->GroupsList,&iter); + yon_config_remove_by_key(USERADD(name)); + yon_config_remove_by_key(USERSHADOW(name)); + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->GroupsList),&iter); + } + } + } + char *name; + if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->GroupsList),&iter)){ + gtk_tree_model_get(GTK_TREE_MODEL(widgets->GroupsList),&iter,1,&name,-1); + int valid2 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itar); + for (;valid2;valid2 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itar)){ + char *name_check; + int status,delete; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itar,0,&delete,1,&name_check,3,&status,-1); + if (!strcmp(name,name_check)&&delete){ + gtk_list_store_remove(widgets->GroupsList,&iter); + yon_config_remove_by_key(GROUPADD(name)); + gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->GroupsList),&iter); + if (status){ + if (yon_char_parsed_check_exist(main_config.remove_homes,main_config.homes_size,name)==-1){ + yon_char_parsed_add_or_create_if_exists(main_config.remove_homes,&main_config.homes_size,name); + } + } + } + } + } + on_subwindow_close(self); +} + yon_confirmation_window *yon_delete_confirmation_new(){ yon_confirmation_window *window = malloc(sizeof(yon_confirmation_window)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_confirmation); @@ -514,6 +674,38 @@ void yon_delete_confirmation_open(main_window *widgets){ gtk_widget_show(window->Window); } +void yon_group_delete_confirmation_open(main_window *widgets){ + yon_confirmation_window *window = yon_delete_confirmation_new(); + gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window)); + GtkTreeIter iter,itar; + dictionary *dict = NULL; + gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->DeletionTree),2),0); + gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->DeletionTree),3),0); + gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->DeletionTree),4),0); + yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets); + yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window); + g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_group_delete_confirmation_save),dict); + GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList); + GList *list = gtk_tree_selection_get_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model); + int chosen_size=0; + config_str chosen = NULL; + for (int i=0;iGroupsList),&iter); + for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->GroupsList),&iter)){ + char *name; + gtk_tree_model_get(GTK_TREE_MODEL(widgets->GroupsList),&iter,1,&name,-1); + gtk_list_store_append(window->list,&itar); + gtk_list_store_set(window->list,&itar,0,yon_char_parsed_check_exist(chosen,chosen_size,name)>-1?1:0,1,name,-1); + free(name); + } + gtk_widget_show(window->Window); +} + yon_savasettings_window *yon_saving_settings_new(){ GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_savesettings); yon_savasettings_window *window = malloc(sizeof(yon_savasettings_window)); @@ -571,16 +763,26 @@ void on_groups_save(GtkWidget *self, dictionary *dict){ } void on_groups_clicked(GtkWidget *self, GtkEntry *output_target){ - ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(); + ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(0); gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),MAIN_GROUP_LABEL); gtk_label_set_text(GTK_LABEL(window->HeaderLabel),MAIN_GROUP_LABEL); - GtkTreeIter iter, itar; + GtkTreeIter iter, itar,itor; int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.groups_list),&iter); for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.groups_list),&iter)){ char *groupname; gtk_tree_model_get(GTK_TREE_MODEL(main_config.groups_list),&iter,1,&groupname,-1); - gtk_list_store_append(window->list,&itar); - gtk_list_store_set(window->list,&itar,1,groupname,-1); + int valid1 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itor); + for (;valid1;valid1 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itor)){ + char *checked; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itor,1,&checked,-1); + if (!strcmp(groupname,checked)){ + break; + } + } + if (!valid1){ + gtk_list_store_append(window->list,&itar); + gtk_list_store_set(window->list,&itar,1,groupname,-1); + } free(groupname); } gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->GroupsTree),0),0); @@ -616,10 +818,10 @@ void on_groups_multiple_save(GtkWidget *self, dictionary *dict){ } void on_groups_multiple_clicked(GtkWidget *self, GtkEntry *output_target){ - ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(); + ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(0); gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),ADDITIONAL_GROUPS_TITLE_LABEL); gtk_label_set_text(GTK_LABEL(window->HeaderLabel),ADDITIONAL_GROUPS_TITLE_LABEL); - GtkTreeIter iter, itar; + GtkTreeIter iter, itar,itor; char *output = (char*)gtk_entry_get_text(output_target); int size=0; config_str parsed=NULL; @@ -630,8 +832,18 @@ void on_groups_multiple_clicked(GtkWidget *self, GtkEntry *output_target){ for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.groups_list),&iter)){ char *groupname; gtk_tree_model_get(GTK_TREE_MODEL(main_config.groups_list),&iter,1,&groupname,-1); - gtk_list_store_append(window->list,&itar); - gtk_list_store_set(window->list,&itar,1,groupname,-1); + int valid1 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itor); + for (;valid1;valid1 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itor)){ + char *checked; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itor,1,&checked,-1); + if (!strcmp(groupname,checked)){ + break; + } + } + if (!valid1){ + gtk_list_store_append(window->list,&itar); + gtk_list_store_set(window->list,&itar,1,groupname,-1); + } free(groupname); } valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&iter); @@ -659,7 +871,7 @@ void on_passwords_encrypt(){ } } -void on_password_change(GtkWidget *self, dictionary *entry_dict){// +void on_password_change(GtkWidget *self, dictionary *entry_dict){ GtkComboBox *combo = yon_dictionary_get_data(entry_dict->first,GtkComboBox*); GtkEntry *output_target = yon_dictionary_get_data(entry_dict->first->next,GtkEntry*); ubl_settings_usergroups_password_window *window = yon_ubl_settings_usergroups_password_new(); @@ -796,7 +1008,7 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_ if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0'; int parsed_size; config_str parsed = yon_char_parse(hash_algos[i],&parsed_size,";"); - gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),parsed[0],parsed[1]); + gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),parsed[0],_(parsed[1])); gtk_widget_set_tooltip_text(window->PasswordHashCombo,parsed[1]); yon_char_parsed_free(parsed,parsed_size); } @@ -863,11 +1075,11 @@ void on_ubl_settings_usergroups_additional_settings_open(GtkWidget *self, main_w } void on_user_choose(GtkWidget *self, GtkEntry *target){ - ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(); + ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(1); gtk_label_set_text(GTK_LABEL(window->HeaderLabel),GROUP_USERS_TITLE_LABEL); gtk_label_set_text(GTK_LABEL(window->HeaderLabel),GROUP_USERS_TITLE_LABEL); gtk_tree_view_column_set_title(GTK_TREE_VIEW_COLUMN(window->GroupColumn),USERS_LABEL); - GtkTreeIter iter, itar; + GtkTreeIter iter, itar,itor; char *output = (char*)gtk_entry_get_text(target); int size=0; config_str parsed=NULL; @@ -878,8 +1090,18 @@ void on_user_choose(GtkWidget *self, GtkEntry *target){ for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.users_list),&iter)){ char *groupname; gtk_tree_model_get(GTK_TREE_MODEL(main_config.users_list),&iter,2,&groupname,-1); - gtk_list_store_append(window->list,&itar); - gtk_list_store_set(window->list,&itar,1,groupname,-1); + int valid1 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itor); + for (;valid1;valid1 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itor)){ + char *checked; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itor,1,&checked,-1); + if (!strcmp(groupname,checked)){ + break; + } + } + if (!valid1){ + gtk_list_store_append(window->list,&itar); + gtk_list_store_set(window->list,&itar,1,groupname,-1); + } free(groupname); } valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&iter); @@ -975,12 +1197,12 @@ void on_group_save(GtkWidget *self, dictionary *dict){ admins = (char*)gtk_entry_get_text(GTK_ENTRY(window->AdminGroupsEntry)); int non_unique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UnuniqueGIDCheck)); if(non_unique_active){ - non_unique=" --non-unique"; + non_unique="--non-unique"; } else non_unique=""; int gsystem_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->SystemGroupCheck)); if(gsystem_active){ - gsystem=" --system"; + gsystem="--system"; } else gsystem=""; int shutdown_sync_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->GroupaddShutdownCheck)); @@ -1003,7 +1225,8 @@ void on_group_save(GtkWidget *self, dictionary *dict){ GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList); if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model,&iter)) gtk_list_store_append(widgets->GroupsList,&iter); - gtk_list_store_set(widgets->GroupsList,&iter,0,strcmp(gid,"x")?gid:AUTOMATICALLY_LABEL,1,group_name,2,group_users,3,yon_char_append(non_unique,gsystem),4,gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->PasswordCombo)),-1); + char *passwor = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry)); + gtk_list_store_set(widgets->GroupsList,&iter,0,strcmp(gid,"x")?gid:"",1,group_name,2,group_users,3,yon_char_append(non_unique,gsystem),4,gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordCombo))==0?PASSWORD_NO_SET_LABEL:check_is_password_hash(passwor)?UNENCRYPTED_LABEL:ENCRYPTED_LABEL,-1); on_subwindow_close(self); } @@ -1087,7 +1310,7 @@ void on_group_clicked(GtkCellRenderer *self, char *path, ubl_settings_usergroups gtk_list_store_set(window->list,&iter,0,!status,-1); } -ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new(){ +ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new(int mode){ // 1 - user, 0 - group ubl_settings_usergroups_group_window *window = malloc(sizeof(ubl_settings_usergroups_group_window)); GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_group); window->GroupsWindow=yon_gtk_builder_get_widget(builder,"GroupsWindow"); @@ -1103,13 +1326,22 @@ ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new(){ gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),GROUPS_TITLE_LABEL); g_signal_connect(G_OBJECT(window->StatusCell),"toggled",G_CALLBACK(on_group_clicked),window); GtkTreeIter iter; - gtk_tree_view_set_model(GTK_TREE_VIEW(window->GroupsTree),GTK_TREE_MODEL(window->list)); - for (int i=0;ilist,&iter); gtk_list_store_set(window->list,&iter,0,0,1,group_name,-1); } + gtk_tree_view_set_model(GTK_TREE_VIEW(window->GroupsTree),GTK_TREE_MODEL(window->list)); g_signal_connect(G_OBJECT(window->GroupsCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL); @@ -1137,16 +1369,26 @@ void on_standard_groups_accept(GtkWidget *self, ubl_settings_usergroups_group_wi } void on_standard_groups_open(GtkWidget *self, main_window *widgets){ - ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(); + ubl_settings_usergroups_group_window *window = yon_ubl_settings_usergroups_group_new(0); gtk_window_set_title(GTK_WINDOW(window->GroupsWindow),DEFAULT_GROUPS_TITLE_LABEL); gtk_label_set_text(GTK_LABEL(window->HeaderLabel),DEFAULT_GROUPS_TITLE_LABEL); - GtkTreeIter iter, itar; + GtkTreeIter iter, itar,itor; int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(main_config.groups_list),&iter); for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(main_config.groups_list),&iter)){ char *groupname; gtk_tree_model_get(GTK_TREE_MODEL(main_config.groups_list),&iter,1,&groupname,-1); - gtk_list_store_append(window->list,&itar); - gtk_list_store_set(window->list,&itar,1,groupname,-1); + int valid1 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itor); + for (;valid1;valid1 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itor)){ + char *checked; + gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itor,1,&checked,-1); + if (!strcmp(groupname,checked)){ + break; + } + } + if (!valid1){ + gtk_list_store_append(window->list,&itar); + gtk_list_store_set(window->list,&itar,1,groupname,-1); + } free(groupname); } g_signal_connect(G_OBJECT(window->GroupsOkButton),"clicked",G_CALLBACK(on_standard_groups_accept),window); @@ -1160,11 +1402,11 @@ void on_standard_groups_open(GtkWidget *self, main_window *widgets){ for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&iter)){ char *cur_name; gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,1,&cur_name,-1); - for (int i=0;ilist,&iter,0,1,-1); + for (int i=0;ilist,&iter,0,1,-1); + } } - } free(cur_name); } } @@ -1381,7 +1623,6 @@ return window; void on_settings_usergroups_system_open(GtkWidget *self, main_window *widgets){ ubl_settings_usergroups_system_window *window = yon_ubl_settings_usergroups_system_new(); - gtk_window_set_transient_for(GTK_WINDOW(window->MonitorWindow),GTK_WINDOW(widgets->Window)); gtk_widget_show(window->MonitorWindow); } @@ -1489,7 +1730,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){ int do_not_check_actve = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck)); if (do_not_check_actve) - do_not_check = " --badnames"; + do_not_check = "--badnames"; login = (char*)gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry)); if (login[0]>'0'&&login[0]<'9'&&!do_not_check_actve){ @@ -1511,18 +1752,20 @@ void on_user_save(GtkWidget *self, dictionary *dict){ yon_ubl_status_highlight_incorrect(window->userPasswordEntry); return; } - if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck))){ - if (password[0]=='%'&&password[1]=='%'){ - char *temp = yon_char_replace(password,"%%","!!"); - password = yon_char_replace(temp,"!!","%%!*"); - } else { - password = yon_char_append("!*",password); - } - } } else { password=""; } + deactivate = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck)); + if (deactivate){ + if (strlen(password)>1&&password[0]=='%'&&password[1]=='%'){ + char *temp = yon_char_replace(password,"%%","!!"); + password = yon_char_replace(temp,"!!","%%!*"); + } else { + password = yon_char_append("!*",password); + } + } + username = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUserNameEntry)); if (yon_char_is_empty(username)){ username=""; @@ -1557,8 +1800,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){ long password_interval_maximum = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMaximumSpin)); password_expiration_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordExpirationEntry)); - if (!yon_char_is_empty(password_expiration_date)){ - password_expiration_date = window->expiration_unix; + if (yon_char_is_empty(password_expiration_date)){ + password_expiration_date=""; } long warning_days_active = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userWarningSpin)); @@ -1572,9 +1815,9 @@ void on_user_save(GtkWidget *self, dictionary *dict){ int user_shell_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo)); if (user_shell_active>0){ - user_shell = yon_char_unite(" --shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); + user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); if (!strcmp(user_shell,SET_LABEL)){ - user_shell = yon_char_unite(" --shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); + user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); } } else user_shell=""; @@ -1587,11 +1830,11 @@ void on_user_save(GtkWidget *self, dictionary *dict){ int system_user_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck)); if (system_user_active) - create_system_user = " --system"; + create_system_user = "--system"; int create_ununique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck)); if (create_ununique_active) - create_ununique = " --non-unique"; + create_ununique = "--non-unique"; samba_sync = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck)); samba_password_sync = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck)); @@ -1607,9 +1850,6 @@ void on_user_save(GtkWidget *self, dictionary *dict){ yon_samba_sync_remove(login); } - int deactivate_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck)); - if (deactivate_active); - extra_options=(char*)gtk_entry_get_text(GTK_ENTRY(window->userExtraOptionsEntry)); if (!window->old_password||window->old_password&&strcmp(window->old_password,password)){ @@ -1624,6 +1864,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){ day=yon_char_append("0",day); } password_changed_date = yon_char_unite(yon_char_from_int(1900+tm.tm_year),"-",month,"-",day,NULL); + } else { + password_changed_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordChangedEntry)); } int force_at_next_login_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userForceChangeCheck)); @@ -1709,7 +1951,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){ if (!gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&model,&iter)) gtk_list_store_append(widgets->UsersList,&iter); gtk_list_store_set(widgets->UsersList,&iter, - 1,yon_char_return_if_exist(uid_string,AUTOMATICALLY_LABEL), + 0,deactivate, + 1,yon_char_return_if_exist(uid_string,""), 2,yon_char_return_if_exist(login,""), 3,yon_char_return_if_exist(username,""), 4,yon_char_return_if_exist(main_group,login), @@ -1773,10 +2016,23 @@ void on_toggle_button_set_active_from_toggle_button_inversed(GtkToggleButton *se void on_date_selected(GtkWidget *self, ubl_settings_usergroups_user_window *window){ int year=0, month=0, day=0; gtk_calendar_get_date(GTK_CALENDAR(window->ExpirationCalendar),&year,&month,&day); - GDateTime *date = g_date_time_new_local(year,month,day,23,59,59); - char *date_string = g_date_time_format(date,"%Y-%m-%d"); + time_t t = time(NULL); + struct tm tm = *localtime(&t); + if ((1900+tm.tm_year)>year||((1900+tm.tm_year)==year&&tm.tm_mon>month)||((1900+tm.tm_year)==year&&tm.tm_mon==month&&tm.tm_mday>day)) { + gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry), ""); + return; + } + char *dy = yon_char_from_int(day); + char *mn = yon_char_from_int(month+1); + char *yr = yon_char_from_int(year); + if (tm.tm_mon+1<10) mn = yon_char_append("0",mn); + if (tm.tm_mday<10) dy = yon_char_append("0",dy); + char *date_string = yon_char_unite(yr,"-",mn,"-",dy); gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry), date_string); window->expiration_unix=date_string; + free(dy); + free(mn); + free(yr); } void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *window){ @@ -1807,26 +2063,29 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w int user_shell_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo)); if (user_shell_active>0){ - user_shell = yon_char_unite(" --shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); + user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); if (!strcmp(user_shell,SET_LABEL)){ - user_shell = yon_char_unite(" --shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); + user_shell = yon_char_unite("--shell ",(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL); } } else user_shell=""; int user_home_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userHomeCombo)); if (user_home_active==2){ - user_home=yon_char_unite("--home-dir ",(char*)gtk_entry_get_text(GTK_ENTRY(window->userHomeEntry)),NULL); + char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->userHomeEntry)); + if (!yon_char_is_empty(path)) + user_home=yon_char_unite("--home-dir ",path,NULL); + else user_home = ""; } else if (user_home_active==1){ user_home="--no-create-home"; } else user_home = ""; int system_user_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck)); if (system_user_active) - create_system_user = " --system"; + create_system_user = "--system"; int create_ununique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck)); if (create_ununique_active) - create_ununique = " --non-unique"; + create_ununique = "--non-unique"; int main_group_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck)); if (!main_group_active){ main_group = (char*)gtk_entry_get_text(GTK_ENTRY(window->userGroupsEntry)); @@ -1837,7 +2096,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w main_group = ""; } char *final_string = user_home; - final_string = yon_char_unite(!yon_char_is_empty(final_string)?" ":"", + final_string = yon_char_unite(final_string,!yon_char_is_empty(final_string)?" ":"", yon_char_return_if_exist(user_shell,""), !yon_char_is_empty(user_shell)?" ":"", yon_char_return_if_exist(create_system_user,""), @@ -1848,6 +2107,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w !yon_char_is_empty(do_not_check)?" ":"", yon_char_return_if_exist(no_user_group,""), NULL); + if (final_string[strlen(final_string)-1]==' ') final_string[strlen(final_string)-1]='\0'; gtk_entry_set_text(GTK_ENTRY(window->userExtraOptionsEntry),final_string); free(final_string); } @@ -1900,6 +2160,12 @@ ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){ window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel"); window->expiration_unix=NULL; + + time_t t = time(NULL); + struct tm tm = *localtime(&t); + gtk_calendar_select_day(GTK_CALENDAR(window->ExpirationCalendar),tm.tm_mday); + gtk_calendar_select_month(GTK_CALENDAR(window->ExpirationCalendar),tm.tm_mon,1900+tm.tm_year); + on_UID_update(NULL,window); int shell_size=0; config_str shells = yon_file_open(shell_list_path,&shell_size); @@ -2029,7 +2295,7 @@ void on_main_edit(GtkWidget *self, main_window *widgets){ gtk_entry_set_text(GTK_ENTRY(window->userUserNameEntry), parsed_size>0?parameters[0]:""); window->old_username=name; if (parsed_size>1){ - if (parsed_size>1&&!strcmp(parameters[1],"x")||parsed_size<=1||strcmp(parameters[1],"")){ + if (parsed_size>1&&!strcmp(parameters[1],"x")&&!strcmp(parameters[1],"")||parsed_size<=1){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0); gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry), parsed_size>1?parameters[1]:""); } @@ -2049,7 +2315,7 @@ void on_main_edit(GtkWidget *self, main_window *widgets){ } } - if (parsed_size>4&&!yon_char_is_empty(parameters[4])){ + if (parsed_size>4&&!yon_char_is_empty(parameters[4])&&strcmp(parameters[4],"")&&strcmp(parameters[4],"x")){ int params_size; config_str parameters_substring = yon_char_parse(parameters[4],¶ms_size," "); for (int i=0;iuserHomeCombo),2); }else if (!strcmp(parameters_substring[i],"--no-user-group")||!strcmp(parameters_substring[i],"-N")){ - // gtk gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck),0); gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry),""); }else if (!strcmp(parameters_substring[i],"--non-unique")||!strcmp(parameters_substring[i],"-o")){ @@ -2079,7 +2344,6 @@ void on_main_edit(GtkWidget *self, main_window *widgets){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck),1); } } - // gtk_entry_set_text(GTK_ENTRY(window->), parsed_size>4?parameters[4]:""); } if (parsed_size>5){ window->old_password=parameters[5]; @@ -2088,8 +2352,10 @@ void on_main_edit(GtkWidget *self, main_window *widgets){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck),1); } yon_char_divide(strstr(parameters[5],"!*"),1); - gtk_entry_set_text(GTK_ENTRY(window->userPasswordEntry),parameters[5]); - gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),2); + if (!yon_char_is_empty(parameters[5])){ + gtk_entry_set_text(GTK_ENTRY(window->userPasswordEntry),parameters[5]); + gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),2); + } } } int samba_sync = yon_samba_sync_get(name); @@ -2157,10 +2423,10 @@ void on_main_edit(GtkWidget *self, main_window *widgets){ if (size>1&&strcmp(parsed[0],"x")) gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry),parsed[0]); if (size>1){ - if (!strcmp(parsed[1],"")||!strcmp(parsed[1],"x")) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),1); - else + if (strcmp(parsed[1],"")&&strcmp(parsed[1],"x")){ gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),parsed[1]); + gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0); + } } if (size>2&&!yon_char_is_empty(parsed[2])){ int parsed_size=0; @@ -2218,18 +2484,7 @@ void on_main_delete(GtkWidget *self, main_window *widgets){ if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){ yon_delete_confirmation_open(widgets); } else { - model = GTK_TREE_MODEL(widgets->GroupsList); - cur_tree=widgets->GroupsTree; - if(gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(cur_tree)),&model,&iter)){ - char *name; - gtk_tree_model_get(model,&iter,1,&name,-1); - data->action_text=DELETE_CONFIRMATION_LABEL("group",name); - if (yon_confirmation_dialog_call(self,data)==GTK_RESPONSE_ACCEPT){ - yon_config_remove_by_key(GROUPADD(name)); - gtk_list_store_remove(GTK_LIST_STORE(model),&iter); - - } - } + yon_group_delete_confirmation_open(widgets); } } @@ -2302,9 +2557,6 @@ void config_init(){ if (!strcmp(divided,"minlen")){ main_config.password_min_length = atol(strstr(login_defs[i],"\t")); } - // else if (!strcmp(divided,"UID_MIN")){ - // main_config.MINUID = atol(strstr(login_defs[i],"\t")); - // } } } } @@ -2320,7 +2572,6 @@ void config_init(){ } free(parameter); } - // yon_char_parsed_free(file_output,size); } void on_selection_changed(GtkWidget *self, main_window *widgets){ diff --git a/source/ubl-settings-usergroups.h b/source/ubl-settings-usergroups.h index f013345..19dde23 100644 --- a/source/ubl-settings-usergroups.h +++ b/source/ubl-settings-usergroups.h @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include diff --git a/source/ubl-strings.h b/source/ubl-strings.h index e48cd47..2343452 100644 --- a/source/ubl-strings.h +++ b/source/ubl-strings.h @@ -74,6 +74,21 @@ #define ACCEPT_LABEL _("Accept") #define ENCRYPT_SURE_LABEL _("Are you sure want to encrypt all passwords?\nThis action can't be undone.") #define ENCRYPT_TOOLTIP_LABEL _("Encrypt all unencrypted passwords at global configuration") +#define DES_DESCRIPTION_LABEL _("DES (Algorithm for Symmetric Encryption)") +#define MD5_DESCRIPTION_LABEL _("MD5 (128-bit hashing algorithm)") +#define YESCRYPT_DESCRIPTION_LABEL _("yescrypt (Cryptographic hash function)") +#define GOST_YESCRYPT_DESCRIPTION_LABEL _("GOST-YESCRYPT (Design according to GOST R 34.11─2012)") +#define SCRYPT_DESCRIPTION_LABEL _("scrypt (Adaptive cryptographic key generation function)") +#define BLOWFISH_DESCRIPTION_LABEL _("Blowfish (Symmetric Block Cipher Algorithm)") +#define BCRYPT_DESCRIPTION_LABEL _("bcrypt (Adaptive hash function from the Blowfish family of algorithms)") +#define BCRYPT_A_DESCRIPTION_LABEL _("bcrypt-a (Adaptive hash function from the Blowfish family of algorithms)") +#define SHA512_DESCRIPTION_LABEL _("SHA512 (Hash function from the SHA-2 family of algorithms)") +#define SHA256_DESCRIPTION_LABEL _("SHA256 (Hash function from the SHA-2 family of algorithms)") +#define SUN_MD5_DESCRIPTION_LABEL _("Sun MD5 (Hash algorithm from Sun Microsystems)") +#define MD5_UNIX_DESCRIPTION_LABEL _("MD5 Unix (Hash algorithm calls standard MD5 thousand times)") +#define EXTENDED_DES_DESCRIPTION_LABEL _("Extended DES Crypt (Hash function from the BSDi family of DES algorithms)") +#define DESCRYPT_DESCRIPTION_LABEL _("descrypt (Hash function from the DES family of algorithms)") +#define NTHASH_DESCRIPTION_LABEL _("NTHash (Hash function from the NT Windows family of algorithms)") //ubl-settings-usergroups-group-creation.glade #define CONFIGURE_GROUP_TITLE_LABEL _("Configure group") @@ -101,7 +116,7 @@ //ubl-settings-usergroups-system.glade #define INSPECTOR_TITLE_LABEL _("System users and groups") -#define DISABLED_LABEL _("Disabled") +#define LOCKED_LABEL _("Locked") #define USERNAME_LABEL _("Username") #define PRIMARY_GROUP_LABEL _("Primary\ngroup") #define HOME_DIRECTORY_LABEL _("Home\ndirectory") @@ -165,6 +180,8 @@ #define ADDITIONAL_NAME_LABEL _("Additional") #define SYNCRONIZATION_NAME_LABEL _("Syncronization") +#define PASSWORD_NO_SET_LABEL _("Not specified") + //ubl-settings-usergroups-password.glade #define PASSWORD_REPEAT_LABEL _("Repeat password:") #define PASSWORD_HASH_LABEL _("Password hash:") @@ -176,9 +193,12 @@ #define SYSTEM_SAVEMODE_LABEL _("For system save mode \"Sandbox\"") //ubl-settings-usergroups-confirmation.glade +#define DELETE_GROUP_CONFIRMATION_TITLE_LABEL _("Group deletion") +#define DELETE_GROUP_CONFIRMATION_CONFIRM_LABEL _("Confirm group(-s) deletion:") + #define DELETE_CONFIRMATION_TITLE_LABEL _("User deletion") #define DELETE_CONFIRMATION_CONFIRM_LABEL _("Confirm user(-s) deletion:") #define DELETE_CONFIRMATION_CHOSEN_LABEL _("Chosen") #define DELETE_CONFIRMATION_USER_LABEL _("User") #define DELETE_CONFIRMATION_HOME_LABEL _("Home directory") -#define DELETE_CONFIRMATION_DELETE_HOME_LABEL _("Delete home directory") \ No newline at end of file +#define DELETE_CONFIRMATION_DELETE_HOME_LABEL _("Delete home directory") diff --git a/ubl-settings-usergroups-system.glade b/ubl-settings-usergroups-system.glade index f7cf5ac..18d4aa7 100644 --- a/ubl-settings-usergroups-system.glade +++ b/ubl-settings-usergroups-system.glade @@ -59,7 +59,6 @@ 800 600 False - True com.ublinux.ubl-settings-usergroups @@ -141,7 +140,7 @@ True fixed 50 - Disabled + Locked @@ -168,6 +167,7 @@ fixed 50 Login + 2 @@ -182,6 +182,7 @@ fixed 50 Username + 3 @@ -197,6 +198,7 @@ 50 Primary group + 4 @@ -212,6 +214,7 @@ group 50 Additional groups + 5 150 @@ -227,6 +230,7 @@ groups 50 Home directory + 6 @@ -239,6 +243,7 @@ directory Shell path + 7 @@ -251,6 +256,7 @@ path Password has been changed + 8 @@ -263,6 +269,7 @@ been changed Expiration date + 9 @@ -275,6 +282,7 @@ date Password change interval (min) + 10 @@ -287,6 +295,7 @@ interval (min) Password change interval (max) + 11 @@ -299,6 +308,7 @@ interval (max) Days until warning + 12 @@ -311,6 +321,7 @@ warning Days without activity + 13 @@ -369,6 +380,7 @@ without activity fixed 50 Group + 1 150 @@ -384,6 +396,7 @@ without activity 50 Group users + 2 diff --git a/ubl-settings-usergroups.desktop b/ubl-settings-usergroups.desktop index 527e73d..1ccea0e 100644 --- a/ubl-settings-usergroups.desktop +++ b/ubl-settings-usergroups.desktop @@ -5,11 +5,11 @@ Name[ru]=Пользователи и группы GenericName=ubl-settings-usergroups GenericName[ru]=Пользователи и группы Comment=System users and groups configuration -Comment[ru]=Настройка пользователей и групп системы (глобальная настройка, через конфигурационный файл) +Comment[ru]=Настройка пользователей и групп системы Type=Application Exec=pkexec ubl-settings-usergroups Icon=com.ublinux.ubl-settings-usergroups Terminal=false X-XfcePluggable=true X-UBLPluggable=true -Categories=X-UBL-SettingsManager;X-UBL-SystemSettings +Categories=X-UBL-SettingsManager;X-UBL-SystemSettings;SystemSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;Settings;DesktopSettings diff --git a/ubl-settings-usergroups.glade b/ubl-settings-usergroups.glade index 60b4421..16713af 100644 --- a/ubl-settings-usergroups.glade +++ b/ubl-settings-usergroups.glade @@ -329,10 +329,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. True fixed 10 - Disabled + Locked 0 + + 0 + diff --git a/ubl-settings-usergroups.pot b/ubl-settings-usergroups.pot index 3356d69..8974fc1 100644 --- a/ubl-settings-usergroups.pot +++ b/ubl-settings-usergroups.pot @@ -53,7 +53,7 @@ msgstr "" msgid "UID" msgstr "" -#: source/ubl-strings.h:14 source/ubl-strings.h:85 +#: source/ubl-strings.h:14 source/ubl-strings.h:100 msgid "Login" msgstr "" @@ -211,7 +211,7 @@ msgstr "" msgid "Set a password" msgstr "" -#: source/ubl-strings.h:60 source/ubl-strings.h:88 +#: source/ubl-strings.h:60 source/ubl-strings.h:103 msgid "Encrypted" msgstr "" @@ -233,387 +233,461 @@ msgstr "" msgid "Encrypt all unencrypted passwords at global configuration" msgstr "" +#: source/ubl-strings.h:77 +msgid "DES (Algorithm for Symmetric Encryption)" +msgstr "" + +#: source/ubl-strings.h:78 +msgid "MD5 (128-bit hashing algorithm)" +msgstr "" + #: source/ubl-strings.h:79 -msgid "Configure group" +msgid "yescrypt (Cryptographic hash function)" msgstr "" #: source/ubl-strings.h:80 -msgid "Add group" +msgid "GOST-YESCRYPT (Design according to GOST R 34.11─2012)" msgstr "" #: source/ubl-strings.h:81 -msgid "Group id:" +msgid "scrypt (Adaptive cryptographic key generation function)" msgstr "" #: source/ubl-strings.h:82 -msgid "Group name:" +msgid "Blowfish (Symmetric Block Cipher Algorithm)" msgstr "" #: source/ubl-strings.h:83 -msgid "Group users:" +msgid "bcrypt (Adaptive hash function from the Blowfish family of algorithms)" msgstr "" #: source/ubl-strings.h:84 -msgid "Automatically" +msgid "" +"bcrypt-a (Adaptive hash function from the Blowfish family of algorithms)" +msgstr "" + +#: source/ubl-strings.h:85 +msgid "SHA512 (Hash function from the SHA-2 family of algorithms)" msgstr "" #: source/ubl-strings.h:86 -msgid "Create group with ununique GID" +msgid "SHA256 (Hash function from the SHA-2 family of algorithms)" msgstr "" #: source/ubl-strings.h:87 -msgid "Create system group" +msgid "Sun MD5 (Hash algorithm from Sun Microsystems)" +msgstr "" + +#: source/ubl-strings.h:88 +msgid "MD5 Unix (Hash algorithm calls standard MD5 thousand times)" msgstr "" #: source/ubl-strings.h:89 -msgid "Additional configuration" +msgid "" +"Extended DES Crypt (Hash function from the BSDi family of DES algorithms)" msgstr "" #: source/ubl-strings.h:90 -msgid "Group configuration synchronization" +msgid "descrypt (Hash function from the DES family of algorithms)" msgstr "" #: source/ubl-strings.h:91 +msgid "NTHash (Hash function from the NT Windows family of algorithms)" +msgstr "" + +#: source/ubl-strings.h:94 +msgid "Configure group" +msgstr "" + +#: source/ubl-strings.h:95 +msgid "Add group" +msgstr "" + +#: source/ubl-strings.h:96 +msgid "Group id:" +msgstr "" + +#: source/ubl-strings.h:97 +msgid "Group name:" +msgstr "" + +#: source/ubl-strings.h:98 +msgid "Group users:" +msgstr "" + +#: source/ubl-strings.h:99 +msgid "Automatically" +msgstr "" + +#: source/ubl-strings.h:101 +msgid "Create group with ununique GID" +msgstr "" + +#: source/ubl-strings.h:102 +msgid "Create system group" +msgstr "" + +#: source/ubl-strings.h:104 +msgid "Additional configuration" +msgstr "" + +#: source/ubl-strings.h:105 +msgid "Group configuration synchronization" +msgstr "" + +#: source/ubl-strings.h:106 msgid "When shutting down the system, save the group into the configuration" msgstr "" -#: source/ubl-strings.h:92 +#: source/ubl-strings.h:107 msgid "Group administrators:" msgstr "" -#: source/ubl-strings.h:93 +#: source/ubl-strings.h:108 msgid "Group name must not start with digit" msgstr "" -#: source/ubl-strings.h:96 +#: source/ubl-strings.h:111 msgid "Default groups" msgstr "" -#: source/ubl-strings.h:97 +#: source/ubl-strings.h:112 msgid "Main group" msgstr "" -#: source/ubl-strings.h:98 +#: source/ubl-strings.h:113 msgid "Additional groups" msgstr "" -#: source/ubl-strings.h:99 +#: source/ubl-strings.h:114 msgid "Choose groups" msgstr "" -#: source/ubl-strings.h:100 +#: source/ubl-strings.h:115 msgid "Choose users" msgstr "" -#: source/ubl-strings.h:103 +#: source/ubl-strings.h:118 msgid "System users and groups" msgstr "" -#: source/ubl-strings.h:104 -msgid "Disabled" +#: source/ubl-strings.h:119 +msgid "Locked" msgstr "" -#: source/ubl-strings.h:105 +#: source/ubl-strings.h:120 msgid "Username" msgstr "" -#: source/ubl-strings.h:106 +#: source/ubl-strings.h:121 msgid "" "Primary\n" "group" msgstr "" -#: source/ubl-strings.h:107 +#: source/ubl-strings.h:122 msgid "" "Home\n" "directory" msgstr "" -#: source/ubl-strings.h:108 source/ubl-strings.h:114 +#: source/ubl-strings.h:123 source/ubl-strings.h:129 msgid "Group" msgstr "" -#: source/ubl-strings.h:109 +#: source/ubl-strings.h:124 msgid "Update the system users and groups list" msgstr "" -#: source/ubl-strings.h:110 +#: source/ubl-strings.h:125 msgid "Toggle system groups and users" msgstr "" -#: source/ubl-strings.h:112 +#: source/ubl-strings.h:127 msgid "Password mismatch" msgstr "" -#: source/ubl-strings.h:113 +#: source/ubl-strings.h:128 msgid "Password must be at least" msgstr "" -#: source/ubl-strings.h:113 +#: source/ubl-strings.h:128 msgid "characters" msgstr "" -#: source/ubl-strings.h:115 +#: source/ubl-strings.h:130 msgid "" "Days until\n" "warning" msgstr "" -#: source/ubl-strings.h:116 +#: source/ubl-strings.h:131 msgid "" "Days\n" "without activity" msgstr "" -#: source/ubl-strings.h:117 +#: source/ubl-strings.h:132 msgid "" "Shell\n" "path" msgstr "" -#: source/ubl-strings.h:118 +#: source/ubl-strings.h:133 msgid "" "Password has\n" "been changed" msgstr "" -#: source/ubl-strings.h:119 +#: source/ubl-strings.h:134 msgid "" "Expiration\n" "date" msgstr "" -#: source/ubl-strings.h:120 +#: source/ubl-strings.h:135 msgid "" "Password change\n" "interval (min)" msgstr "" -#: source/ubl-strings.h:121 +#: source/ubl-strings.h:136 msgid "" "Password change\n" "interval (max)" msgstr "" -#: source/ubl-strings.h:124 +#: source/ubl-strings.h:139 msgid "Add user" msgstr "" -#: source/ubl-strings.h:125 +#: source/ubl-strings.h:140 msgid "Configure user" msgstr "" -#: source/ubl-strings.h:126 +#: source/ubl-strings.h:141 msgid "Set" msgstr "" -#: source/ubl-strings.h:127 +#: source/ubl-strings.h:142 msgid "Empty important field" msgstr "" -#: source/ubl-strings.h:128 +#: source/ubl-strings.h:143 msgid "Login must not start with digit" msgstr "" -#: source/ubl-strings.h:129 +#: source/ubl-strings.h:144 msgid "Loading has failed" msgstr "" -#: source/ubl-strings.h:130 +#: source/ubl-strings.h:145 msgid "Login name" msgstr "" -#: source/ubl-strings.h:131 +#: source/ubl-strings.h:146 msgid "Additional groups:" msgstr "" -#: source/ubl-strings.h:132 +#: source/ubl-strings.h:147 msgid "Password configuration" msgstr "" -#: source/ubl-strings.h:133 +#: source/ubl-strings.h:148 msgid "Password has been changed:" msgstr "" -#: source/ubl-strings.h:134 +#: source/ubl-strings.h:149 msgid "expiration date:" msgstr "" -#: source/ubl-strings.h:135 +#: source/ubl-strings.h:150 msgid "Password change interval: minimum" msgstr "" -#: source/ubl-strings.h:136 +#: source/ubl-strings.h:151 msgid "days, maximum" msgstr "" -#: source/ubl-strings.h:137 +#: source/ubl-strings.h:152 msgid "days" msgstr "" -#: source/ubl-strings.h:138 +#: source/ubl-strings.h:153 msgid "Days until warning:" msgstr "" -#: source/ubl-strings.h:139 +#: source/ubl-strings.h:154 msgid "Days without activity:" msgstr "" -#: source/ubl-strings.h:140 +#: source/ubl-strings.h:155 msgid "Force change at next login" msgstr "" -#: source/ubl-strings.h:141 +#: source/ubl-strings.h:156 msgid "User shell:" msgstr "" -#: source/ubl-strings.h:142 +#: source/ubl-strings.h:157 msgid "Home directory:" msgstr "" -#: source/ubl-strings.h:143 +#: source/ubl-strings.h:158 msgid "Don't set" msgstr "" -#: source/ubl-strings.h:144 +#: source/ubl-strings.h:159 msgid "Create system user" msgstr "" -#: source/ubl-strings.h:145 +#: source/ubl-strings.h:160 msgid "Create user with ununique (repeating) UID" msgstr "" -#: source/ubl-strings.h:146 +#: source/ubl-strings.h:161 msgid "Do not check login for compliance with character rules" msgstr "" -#: source/ubl-strings.h:147 +#: source/ubl-strings.h:162 msgid "Temporary deactivation" msgstr "" -#: source/ubl-strings.h:148 +#: source/ubl-strings.h:163 msgid "Save" msgstr "" -#: source/ubl-strings.h:149 +#: source/ubl-strings.h:164 msgid "login_name" msgstr "" -#: source/ubl-strings.h:150 +#: source/ubl-strings.h:165 msgid "group_name" msgstr "" -#: source/ubl-strings.h:151 +#: source/ubl-strings.h:166 msgid "User name" msgstr "" -#: source/ubl-strings.h:152 +#: source/ubl-strings.h:167 msgid "Sync user" msgstr "" -#: source/ubl-strings.h:153 +#: source/ubl-strings.h:168 msgid "Sync user with password" msgstr "" -#: source/ubl-strings.h:154 +#: source/ubl-strings.h:169 msgid "Encrypt all passwords" msgstr "" -#: source/ubl-strings.h:156 +#: source/ubl-strings.h:171 msgid "User configuration" msgstr "" -#: source/ubl-strings.h:157 +#: source/ubl-strings.h:172 msgid "User configuration synchronization" msgstr "" -#: source/ubl-strings.h:158 +#: source/ubl-strings.h:173 msgid "During system startup, load the user from the configuration" msgstr "" -#: source/ubl-strings.h:159 +#: source/ubl-strings.h:174 msgid "When shutting down the system, save the user into the configuration" msgstr "" -#: source/ubl-strings.h:160 +#: source/ubl-strings.h:175 msgid "User password configuration syncronization" msgstr "" -#: source/ubl-strings.h:161 +#: source/ubl-strings.h:176 msgid "" "During system startup, load the user's parameters from the configuration" msgstr "" -#: source/ubl-strings.h:162 +#: source/ubl-strings.h:177 msgid "" "When shutting down the system, save the user's parameters into the " "configuration" msgstr "" -#: source/ubl-strings.h:164 +#: source/ubl-strings.h:179 msgid "Main" msgstr "" -#: source/ubl-strings.h:165 +#: source/ubl-strings.h:180 msgid "Additional" msgstr "" -#: source/ubl-strings.h:166 +#: source/ubl-strings.h:181 msgid "Syncronization" msgstr "" -#: source/ubl-strings.h:169 +#: source/ubl-strings.h:183 +msgid "Not specified" +msgstr "" + +#: source/ubl-strings.h:186 msgid "Repeat password:" msgstr "" -#: source/ubl-strings.h:170 +#: source/ubl-strings.h:187 msgid "Password hash:" msgstr "" -#: source/ubl-strings.h:171 +#: source/ubl-strings.h:188 msgid "Do not encrypt password" msgstr "" -#: source/ubl-strings.h:174 +#: source/ubl-strings.h:191 msgid "Additional configuration of service parameter saving" msgstr "" -#: source/ubl-strings.h:175 +#: source/ubl-strings.h:192 msgid "" "At every system shutdown save changes of (root)/var/lib/samba\n" "into (hd)/ublinux-data/rootcopy" msgstr "" -#: source/ubl-strings.h:176 +#: source/ubl-strings.h:193 msgid "For system save mode \"Sandbox\"" msgstr "" -#: source/ubl-strings.h:179 +#: source/ubl-strings.h:196 +msgid "Group deletion" +msgstr "" + +#: source/ubl-strings.h:197 +msgid "Confirm group(-s) deletion:" +msgstr "" + +#: source/ubl-strings.h:199 msgid "User deletion" msgstr "" -#: source/ubl-strings.h:180 +#: source/ubl-strings.h:200 msgid "Confirm user(-s) deletion:" msgstr "" -#: source/ubl-strings.h:181 +#: source/ubl-strings.h:201 msgid "Chosen" msgstr "" -#: source/ubl-strings.h:182 +#: source/ubl-strings.h:202 msgid "User" msgstr "" -#: source/ubl-strings.h:183 +#: source/ubl-strings.h:203 msgid "Home directory" msgstr "" -#: source/ubl-strings.h:184 +#: source/ubl-strings.h:204 msgid "Delete home directory" msgstr "" msgid "Are you sure want to delete group" -msgstr "Вы уверены, что хотите удалить группу" +msgstr "" msgid "Are you sure want to delete user" -msgstr "Вы уверены, что хотите удалить пользователя" \ No newline at end of file +msgstr "" \ No newline at end of file diff --git a/ubl-settings-usergroups_ru.po b/ubl-settings-usergroups_ru.po index 7e4f282..d492236 100644 --- a/ubl-settings-usergroups_ru.po +++ b/ubl-settings-usergroups_ru.po @@ -53,7 +53,7 @@ msgstr "Алгоритм хэширования пароля:" msgid "UID" msgstr "UID" -#: source/ubl-strings.h:14 source/ubl-strings.h:85 +#: source/ubl-strings.h:14 source/ubl-strings.h:100 msgid "Login" msgstr "Логин" @@ -225,7 +225,7 @@ msgstr "Пароль не требуется" msgid "Set a password" msgstr "Задать пароль" -#: source/ubl-strings.h:60 source/ubl-strings.h:88 +#: source/ubl-strings.h:60 source/ubl-strings.h:103 msgid "Encrypted" msgstr "Зашифрован" @@ -249,91 +249,153 @@ msgstr "" msgid "Encrypt all unencrypted passwords at global configuration" msgstr "Зашифровать все незашифрованные пароли в глобальной конфигурации" +#: source/ubl-strings.h:77 +msgid "DES (Algorithm for Symmetric Encryption)" +msgstr "DES (Алгоритм для симметричного шифрования)" + +#: source/ubl-strings.h:78 +msgid "MD5 (128-bit hashing algorithm)" +msgstr "MD5 (128-битный алгоритм хеширования)" + #: source/ubl-strings.h:79 +msgid "yescrypt (Cryptographic hash function)" +msgstr "yescrypt (Криптографическая хэш-функция)" + +#: source/ubl-strings.h:80 +msgid "GOST-YESCRYPT (Design according to GOST R 34.11─2012)" +msgstr "GOST-YESCRYPT (Конструкция согласно ГОСТ Р 34.11─2012)" + +#: source/ubl-strings.h:81 +msgid "scrypt (Adaptive cryptographic key generation function)" +msgstr "scrypt (Адаптивная криптографическая функция формирования ключа)" + +#: source/ubl-strings.h:82 +msgid "Blowfish (Symmetric Block Cipher Algorithm)" +msgstr "Blowfish (Алгоритм блочного симметричного шифрования)" + +#: source/ubl-strings.h:83 +msgid "bcrypt (Adaptive hash function from the Blowfish family of algorithms)" +msgstr "bcrypt (Адаптивная хеш-функция из семейства алгоритмов Blowfish)" + +#: source/ubl-strings.h:84 +msgid "" +"bcrypt-a (Adaptive hash function from the Blowfish family of algorithms)" +msgstr "bcrypt-a (Адаптивная хеш-функция из семейства алгоритмов Blowfish)" + +#: source/ubl-strings.h:85 +msgid "SHA512 (Hash function from the SHA-2 family of algorithms)" +msgstr "SHA512 (Хеш-функция из семейства алгоритмов SHA-2)" + +#: source/ubl-strings.h:86 +msgid "SHA256 (Hash function from the SHA-2 family of algorithms)" +msgstr "SHA256 (Хеш-функция из семейства алгоритмов SHA-2)" + +#: source/ubl-strings.h:87 +msgid "Sun MD5 (Hash algorithm from Sun Microsystems)" +msgstr "Sun MD5 (Хеш-алгоритм от Sun Microsystems)" + +#: source/ubl-strings.h:88 +msgid "MD5 Unix (Hash algorithm calls standard MD5 thousand times)" +msgstr "MD5 Unix (Хэш-алгоритм вызывает тысячу раз стандартный MD5)" + +#: source/ubl-strings.h:89 +msgid "" +"Extended DES Crypt (Hash function from the BSDi family of DES algorithms)" +msgstr "Extended DES Crypt (Хеш-функция из семейства алгоритмов DES от BSDi)" + +#: source/ubl-strings.h:90 +msgid "descrypt (Hash function from the DES family of algorithms)" +msgstr "descrypt (Хеш-функция из семейства алгоритмов DES)" + +#: source/ubl-strings.h:91 +msgid "NTHash (Hash function from the NT Windows family of algorithms)" +msgstr "NTHash (Хеш-функция из семейства алгоритмов NT Windows)" + +#: source/ubl-strings.h:94 msgid "Configure group" msgstr "Редактировать группу" -#: source/ubl-strings.h:80 +#: source/ubl-strings.h:95 msgid "Add group" msgstr "Добавить группу" -#: source/ubl-strings.h:81 +#: source/ubl-strings.h:96 msgid "Group id:" msgstr "ID Группы:" -#: source/ubl-strings.h:82 +#: source/ubl-strings.h:97 msgid "Group name:" msgstr "Имя группы:" -#: source/ubl-strings.h:83 +#: source/ubl-strings.h:98 msgid "Group users:" msgstr "Пользователи группы:" -#: source/ubl-strings.h:84 +#: source/ubl-strings.h:99 msgid "Automatically" msgstr "Автоматически" -#: source/ubl-strings.h:86 +#: source/ubl-strings.h:101 msgid "Create group with ununique GID" msgstr "Создать группу с повторяющимися (не уникальными) GID" -#: source/ubl-strings.h:87 +#: source/ubl-strings.h:102 msgid "Create system group" msgstr "Создать системную группу" -#: source/ubl-strings.h:89 +#: source/ubl-strings.h:104 msgid "Additional configuration" msgstr "Дополнительные настройки" -#: source/ubl-strings.h:90 +#: source/ubl-strings.h:105 msgid "Group configuration synchronization" msgstr "Синхронизация настроек группы" -#: source/ubl-strings.h:91 +#: source/ubl-strings.h:106 msgid "When shutting down the system, save the group into the configuration" msgstr "При завершении работы системы сохранить группу в конфигурацию" -#: source/ubl-strings.h:92 +#: source/ubl-strings.h:107 msgid "Group administrators:" msgstr "Администраторы группы:" -#: source/ubl-strings.h:93 +#: source/ubl-strings.h:108 msgid "Group name must not start with digit" msgstr "Имя группы не должно начинаться с цифры" -#: source/ubl-strings.h:96 +#: source/ubl-strings.h:111 msgid "Default groups" msgstr "Группы пользователей по умолчанию" -#: source/ubl-strings.h:97 +#: source/ubl-strings.h:112 msgid "Main group" msgstr "Основная группа" -#: source/ubl-strings.h:98 +#: source/ubl-strings.h:113 msgid "Additional groups" msgstr "Дополнительные группы" -#: source/ubl-strings.h:99 +#: source/ubl-strings.h:114 msgid "Choose groups" msgstr "Выбрать группы" -#: source/ubl-strings.h:100 +#: source/ubl-strings.h:115 msgid "Choose users" msgstr "Выбрать пользователей" -#: source/ubl-strings.h:103 +#: source/ubl-strings.h:118 msgid "System users and groups" msgstr "Пользователи и группы в системе" -#: source/ubl-strings.h:104 -msgid "Disabled" +#: source/ubl-strings.h:119 +msgid "Locked" msgstr "Отключен" -#: source/ubl-strings.h:105 +#: source/ubl-strings.h:120 msgid "Username" msgstr "Имя пользователя" -#: source/ubl-strings.h:106 +#: source/ubl-strings.h:121 msgid "" "Primary\n" "group" @@ -341,7 +403,7 @@ msgstr "" "Основная\n" "группа" -#: source/ubl-strings.h:107 +#: source/ubl-strings.h:122 msgid "" "Home\n" "directory" @@ -349,31 +411,31 @@ msgstr "" "Домашний\n" "каталог" -#: source/ubl-strings.h:108 source/ubl-strings.h:114 +#: source/ubl-strings.h:123 source/ubl-strings.h:129 msgid "Group" msgstr "Группа" -#: source/ubl-strings.h:109 +#: source/ubl-strings.h:124 msgid "Update the system users and groups list" msgstr "Обновить список пользователей и групп системы" -#: source/ubl-strings.h:110 +#: source/ubl-strings.h:125 msgid "Toggle system groups and users" msgstr "Переключить видимость системных пользователей и групп" -#: source/ubl-strings.h:112 +#: source/ubl-strings.h:127 msgid "Password mismatch" msgstr "Несовпадение паролей" -#: source/ubl-strings.h:113 +#: source/ubl-strings.h:128 msgid "Password must be at least" msgstr "Пароль должен состоять из как минимум" -#: source/ubl-strings.h:113 +#: source/ubl-strings.h:128 msgid "characters" msgstr "символов" -#: source/ubl-strings.h:115 +#: source/ubl-strings.h:130 msgid "" "Days until\n" "warning" @@ -381,7 +443,7 @@ msgstr "" "Дней до\n" "предупреждения" -#: source/ubl-strings.h:116 +#: source/ubl-strings.h:131 msgid "" "Days\n" "without activity" @@ -389,7 +451,7 @@ msgstr "" "Дней без\n" "активности" -#: source/ubl-strings.h:117 +#: source/ubl-strings.h:132 msgid "" "Shell\n" "path" @@ -397,7 +459,7 @@ msgstr "" "Путь до\n" "оболочки" -#: source/ubl-strings.h:118 +#: source/ubl-strings.h:133 msgid "" "Password has\n" "been changed" @@ -405,7 +467,7 @@ msgstr "" "Пароль\n" "изменён" -#: source/ubl-strings.h:119 +#: source/ubl-strings.h:134 msgid "" "Expiration\n" "date" @@ -413,7 +475,7 @@ msgstr "" "Дата\n" "устаревания" -#: source/ubl-strings.h:120 +#: source/ubl-strings.h:135 msgid "" "Password change\n" "interval (min)" @@ -421,7 +483,7 @@ msgstr "" "Интервал смены\n" "пароля (мин.)" -#: source/ubl-strings.h:121 +#: source/ubl-strings.h:136 msgid "" "Password change\n" "interval (max)" @@ -429,195 +491,199 @@ msgstr "" "Интервал смены\n" "пароля (макс.)" -#: source/ubl-strings.h:124 +#: source/ubl-strings.h:139 msgid "Add user" msgstr "Добавить пользователя" -#: source/ubl-strings.h:125 +#: source/ubl-strings.h:140 msgid "Configure user" msgstr "Редактировать пользователя" -#: source/ubl-strings.h:126 +#: source/ubl-strings.h:141 msgid "Set" msgstr "Задать" -#: source/ubl-strings.h:127 +#: source/ubl-strings.h:142 msgid "Empty important field" msgstr "Пустое важное поле" -#: source/ubl-strings.h:128 +#: source/ubl-strings.h:143 msgid "Login must not start with digit" msgstr "Логин не должен начинаться с цифры" -#: source/ubl-strings.h:129 +#: source/ubl-strings.h:144 msgid "Loading has failed" msgstr "Ошибка загрузки" -#: source/ubl-strings.h:130 +#: source/ubl-strings.h:145 msgid "Login name" msgstr "Имя логина" -#: source/ubl-strings.h:131 +#: source/ubl-strings.h:146 msgid "Additional groups:" msgstr "Дополнительные группы:" -#: source/ubl-strings.h:132 +#: source/ubl-strings.h:147 msgid "Password configuration" msgstr "Конфигурация пароля" -#: source/ubl-strings.h:133 +#: source/ubl-strings.h:148 msgid "Password has been changed:" msgstr "Пароль изменён:" -#: source/ubl-strings.h:134 +#: source/ubl-strings.h:149 msgid "expiration date:" msgstr "Дата устаревания:" -#: source/ubl-strings.h:135 +#: source/ubl-strings.h:150 msgid "Password change interval: minimum" msgstr "Интервал смены пароля: минимум" -#: source/ubl-strings.h:136 +#: source/ubl-strings.h:151 msgid "days, maximum" msgstr "дней, максимум" -#: source/ubl-strings.h:137 +#: source/ubl-strings.h:152 msgid "days" msgstr "дней" -#: source/ubl-strings.h:138 +#: source/ubl-strings.h:153 msgid "Days until warning:" msgstr "Дней до предупреждения:" -#: source/ubl-strings.h:139 +#: source/ubl-strings.h:154 msgid "Days without activity:" msgstr "Дней без активности:" -#: source/ubl-strings.h:140 +#: source/ubl-strings.h:155 msgid "Force change at next login" msgstr "Принудительно сменить при следующем входе в систему" -#: source/ubl-strings.h:141 +#: source/ubl-strings.h:156 msgid "User shell:" msgstr "Оболочка пользователя:" -#: source/ubl-strings.h:142 +#: source/ubl-strings.h:157 msgid "Home directory:" msgstr "Домашний каталог:" -#: source/ubl-strings.h:143 +#: source/ubl-strings.h:158 msgid "Don't set" msgstr "Не создавать" -#: source/ubl-strings.h:144 +#: source/ubl-strings.h:159 msgid "Create system user" msgstr "Создать системного пользователя" -#: source/ubl-strings.h:145 +#: source/ubl-strings.h:160 msgid "Create user with ununique (repeating) UID" msgstr "Создать пользователя с повторяющимися (не уникальными) UID" -#: source/ubl-strings.h:146 +#: source/ubl-strings.h:161 msgid "Do not check login for compliance with character rules" msgstr "Не проверять логин на несоответствие правилам использования символов" -#: source/ubl-strings.h:147 +#: source/ubl-strings.h:162 msgid "Temporary deactivation" msgstr "Временное отключение учётной записи" -#: source/ubl-strings.h:148 +#: source/ubl-strings.h:163 msgid "Save" msgstr "Сохранить" -#: source/ubl-strings.h:149 +#: source/ubl-strings.h:164 msgid "login_name" msgstr "Имя_логина" -#: source/ubl-strings.h:150 +#: source/ubl-strings.h:165 msgid "group_name" msgstr "Имя_группы" -#: source/ubl-strings.h:151 +#: source/ubl-strings.h:166 msgid "User name" msgstr "Имя пользователя" -#: source/ubl-strings.h:152 +#: source/ubl-strings.h:167 msgid "Sync user" msgstr "Синхронизировать пользователя" -#: source/ubl-strings.h:153 +#: source/ubl-strings.h:168 msgid "Sync user with password" msgstr "Синхронизировать пользователя с паролем" -#: source/ubl-strings.h:154 +#: source/ubl-strings.h:169 msgid "Encrypt all passwords" msgstr "Зашифровать все пароли" -#: source/ubl-strings.h:156 +#: source/ubl-strings.h:171 msgid "User configuration" msgstr "Настройка пользователя" -#: source/ubl-strings.h:157 +#: source/ubl-strings.h:172 msgid "User configuration synchronization" msgstr "Синхронизация настроек пользователя" -#: source/ubl-strings.h:158 +#: source/ubl-strings.h:173 msgid "During system startup, load the user from the configuration" msgstr "" "При запуске операционной системы применять настройки пользователя из " "конфигурации" -#: source/ubl-strings.h:159 +#: source/ubl-strings.h:174 msgid "When shutting down the system, save the user into the configuration" msgstr "" "При завершении работы операционной системы сохранить настройки пользователя " "в конфигурацию" -#: source/ubl-strings.h:160 +#: source/ubl-strings.h:175 msgid "User password configuration syncronization" msgstr "Синхронизация настроек пароля пользователя" -#: source/ubl-strings.h:161 +#: source/ubl-strings.h:176 msgid "" "During system startup, load the user's parameters from the configuration" msgstr "При загрузке системы загрузить параметры пользователя из конфигурации" -#: source/ubl-strings.h:162 +#: source/ubl-strings.h:177 msgid "" "When shutting down the system, save the user's parameters into the " "configuration" msgstr "" "При завершении работы системы сохранить параметры пользователя в конфигурацию" -#: source/ubl-strings.h:164 +#: source/ubl-strings.h:179 msgid "Main" msgstr "Основные" -#: source/ubl-strings.h:165 +#: source/ubl-strings.h:180 msgid "Additional" msgstr "Дополнительные" -#: source/ubl-strings.h:166 +#: source/ubl-strings.h:181 msgid "Syncronization" msgstr "Синхронизация" -#: source/ubl-strings.h:169 +#: source/ubl-strings.h:183 +msgid "Not specified" +msgstr "Не задан" + +#: source/ubl-strings.h:186 msgid "Repeat password:" msgstr "Подтверждение пароля:" -#: source/ubl-strings.h:170 +#: source/ubl-strings.h:187 msgid "Password hash:" msgstr "Хэш пароля:" -#: source/ubl-strings.h:171 +#: source/ubl-strings.h:188 msgid "Do not encrypt password" msgstr "Не шифровать пароль" -#: source/ubl-strings.h:174 +#: source/ubl-strings.h:191 msgid "Additional configuration of service parameter saving" msgstr "Дополнительные настройки сохранения параметров сервисов" -#: source/ubl-strings.h:175 +#: source/ubl-strings.h:192 msgid "" "At every system shutdown save changes of (root)/var/lib/samba\n" "into (hd)/ublinux-data/rootcopy" @@ -625,31 +691,39 @@ msgstr "" "При каждом завершении работы ОС сохранять изменения (root)/var/lib/samba\n" "в (hd)/ublinux-data/rootcopy/" -#: source/ubl-strings.h:176 +#: source/ubl-strings.h:193 msgid "For system save mode \"Sandbox\"" msgstr "Для режима сохранения системы \"Песочница\"" -#: source/ubl-strings.h:179 -msgid "User deletion" +#: source/ubl-strings.h:196 +msgid "Group deletion" msgstr "Удаление пользователя(-лей)" -#: source/ubl-strings.h:180 +#: source/ubl-strings.h:197 +msgid "Confirm group(-s) deletion:" +msgstr "Подтвердите удаление групп(-ы):" + +#: source/ubl-strings.h:199 +msgid "User deletion" +msgstr "Удаление групп(-ы)" + +#: source/ubl-strings.h:200 msgid "Confirm user(-s) deletion:" msgstr "Подтвердите удаление пользователя (-ей):" -#: source/ubl-strings.h:181 +#: source/ubl-strings.h:201 msgid "Chosen" msgstr "Выбран" -#: source/ubl-strings.h:182 +#: source/ubl-strings.h:202 msgid "User" msgstr "Пользователь" -#: source/ubl-strings.h:183 +#: source/ubl-strings.h:203 msgid "Home directory" msgstr "Домашний каталог" -#: source/ubl-strings.h:184 +#: source/ubl-strings.h:204 msgid "Delete home directory" msgstr "Удалить домашний каталог"