master #72

Merged
asmeron merged 30 commits from YanTheKaller/ubl-settings-usergroups:master into master 2 years ago

@ -139,6 +139,8 @@ install: check uninstall
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.accept-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.cancel-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/status/" "icons/com.ublinux.${PKGNAME}.profile-settings-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.save-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/icons/hicolor/scalable/actions/" "icons/com.ublinux.${PKGNAME}.lock-symbolic.svg"
@install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv" "csv/hash_list.csv"
@install -Dm644 -t "${DESTDIR}/usr/share/${PKGNAME}/csv" "csv/shell_list.csv"
@install -Dm644 -t "${DESTDIR}/usr/share/polkit-1/actions/" "${CMAKE_BUILD_DIR}/com.ublinux.${PKGNAME}${PKGIDENT}.policy"

@ -8,6 +8,8 @@
<file>ubl-settings-usergroups-group.glade</file>
<file>ubl-settings-usergroups-user.glade</file>
<file>ubl-settings-usergroups-system.glade</file>
<file>ubl-settings-usergroups-savesettings.glade</file>
<file>ubl-settings-usergroups-confirmation.glade</file>
</gresource>
<gresource prefix="/com/ublinux/css">
<file>ubl-settings-usergroups.css</file>

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16"><g color="#bebebe" fill="#474747"><path d="M3 7h10c.554 0 1 .446 1 1v3c0 .554-.446 1-1 1H3c-.554 0-1-.446-1-1V8c0-.554.446-1 1-1z" style="marker:none" overflow="visible"/><path d="M7 1s-.709-.014-1.447.355C4.814 1.725 4 2.667 4 4v4h2V4c0-.667.186-.725.447-.855C6.71 3.014 7 3 7 3h2s.291.014.553.145c.261.13.447.188.447.855v4h2V4c0-1.333-.814-2.275-1.553-2.645C9.71.986 9 1 9 1z" style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000;text-transform:none;text-orientation:mixed;shape-padding:0;isolation:auto;mix-blend-mode:normal;marker:none" font-weight="400" font-family="sans-serif" overflow="visible"/><path d="M2 10h12v4H2z" style="marker:none" overflow="visible"/></g></svg>

After

Width:  |  Height:  |  Size: 998 B

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License) Copyright 2023 Fonticons, Inc. --><path d="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>

After

Width:  |  Height:  |  Size: 697 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

@ -31,6 +31,8 @@ set(DEPENDFILES
../ubl-settings-usergroups-system.glade
../ubl-settings-usergroups-user.glade
../ubl-settings-usergroups-group.glade
../ubl-settings-usergroups-savesettings.glade
../ubl-settings-usergroups-confirmation.glade
../gresource.xml
../ubl-settings-usergroups-banner.png
../ubl-settings-usergroups.css
@ -81,17 +83,6 @@ set(LIBRARIES
add_executable(${PROJECT_NAME} ${SOURCE_FILES} ${CMAKE_CURRENT_BINARY_DIR}/${GRESOURCE_C})
target_link_libraries(${PROJECT_NAME} PUBLIC ${LIBRARIES})
list(FIND LIBRARIES "vte-2.91" VTE_FOUND_INDEX)
list(FIND LIBRARIES "webkit" WEBKIT_FOUND_INDEX)
if(NOT VTE_FOUND_INDEX EQUAL -1)
message(STATUS "Библиотека VTE не добавлена в target_link_libraries()")
add_definitions(-DVTE_INCLUDE)
endif()
if(NOT WEBKIT_FOUND_INDEX EQUAL -1)
add_definitions(-DWEBKIT_INCLUDE)
endif()
target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_BINARY_DIR})
set_source_files_properties(

@ -6,7 +6,7 @@ config main_config;
int yon_load_proceed(YON_CONFIG_TYPE type){
yon_config_load_register(YON_CONFIG_DEFAULT,"users","DEFAULTPASSWD DEFAULTROOTPASSWD USERGROUPS DEFAULTUSER HASHPASSWD ADDADM",NULL);
if (yon_config_load_register_no_cleaning(type,"users","DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERSHADOW[*] GROUPADD[*]",NULL)){
if (yon_config_load_register_no_cleaning(type,"users","DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERSHADOW[*] GROUPADD[*]","[system]","SYSTEMBOOT_STATEMODE","[save]","SAVE_ROOTCOPY_CHANGES",NULL)){
return 1;
}
return 0;
@ -97,6 +97,26 @@ void on_config_global_load(GtkWidget *self, main_window *widgets){
yon_interface_update(widgets);
}
void yon_samba_sync_proceed(){
if (main_config.sync_users){
for (int i=0;i<main_config.sync_size;i++){
int size;
config_str parsed = yon_char_parse(main_config.sync_users[i],&size,":");
if (!yon_char_is_empty(parsed[1])){
if (parsed[1][0]==' '&&parsed[1][1]=='.'&&parsed[1][2]==' ')
free(parsed[1]=yon_char_divide(parsed[1],3));
system (samba_sync_password_command(parsed[0],parsed[1]));
} else {
system ( samba_sync_command(parsed[0]));
}
yon_char_parsed_free(parsed,size);
}
}
}
void on_config_save(){
yon_save_proceed(NULL,YON_CONFIG_BOTH,"users", "DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERSHADOW[*] GROUPADD[*]",NULL);
}
@ -109,6 +129,179 @@ void on_config_local_save(){
yon_save_proceed("system",YON_CONFIG_LOCAL,"users", "DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERSHADOW[*] GROUPADD[*]",NULL);
}
void on_saving_settings_save(GtkWidget *self, yon_savasettings_window *window){
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->SambaCheck))){
if (!yon_config_append("SAVE_ROOTCOPY_CHANGES","/var/lib/samba",",")){
yon_config_register("SAVE_ROOTCOPY_CHANGES","[save]","/var/lib/samba");
}
} else {
yon_config_remove_element("SAVE_ROOTCOPY_CHANGES","/var/lib/samba",",");
}
on_subwindow_close(self);
}
void yon_samba_sync_add(char *user, char*password){
int sync_place = yon_char_parsed_check_exist(main_config.sync_users,main_config.sync_size,yon_char_append(user,":"));
if (sync_place==-1){
yon_char_parsed_add_or_create_if_exists(main_config.sync_users,&main_config.sync_size,yon_char_unite(user,":",password,NULL));
}
}
void yon_samba_sync_remove(char *user){
int sync_place = yon_char_parsed_check_exist(main_config.sync_users,main_config.sync_size,yon_char_append(user,":"));
if (sync_place>-1){
config_str temp = yon_char_parsed_rip(main_config.sync_users,&main_config.sync_size,sync_place);
free(main_config.sync_users);
main_config.sync_users = temp;
}
}
int yon_samba_sync_get(char *user){
int sync_place = yon_char_parsed_check_exist(main_config.sync_users,main_config.sync_size,yon_char_append(user,":"));
if (sync_place>-1){
if (!main_config.sync_users)
return 0;
int active = main_config.sync_users[sync_place][strlen(main_config.sync_users[sync_place])-1]==':'? 1:2;
return active;
}
return 0;
}
void on_delete_confirmation_delete_home_check(GtkCellRenderer *self, char *path, yon_confirmation_window *window){
GtkTreeIter iter;
gboolean status;
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->list),&iter,path);
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,3,&status,-1);
gtk_list_store_set(window->list,&iter,3,!status,-1);
}
void on_delete_confirmation_delete_check(GtkCellRenderer *self, char *path, yon_confirmation_window *window){
GtkTreeIter iter;
gboolean status;
gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(window->list),&iter,path);
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&iter,0,&status,-1);
gtk_list_store_set(window->list,&iter,0,!status,-1);
}
void yon_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->UsersList),&iter);
for (;valid;valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->UsersList),&iter)){
char *name;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->UsersList),&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;
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itar,1,&name_check,-1);
if (!strcmp(name,name_check)){
GtkTreeIter *it = gtk_tree_iter_copy(&iter);
if (!gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->UsersList),&iter)){
iter = *gtk_tree_iter_copy(it);
if (!gtk_tree_model_iter_previous(GTK_TREE_MODEL(widgets->UsersList),&iter)){
iter = *gtk_tree_iter_copy(it);
}
}
gtk_list_store_remove(widgets->UsersList,it);
yon_config_remove_by_key(USERADD(name));
yon_config_remove_by_key(USERSHADOW(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);
window->Window = yon_gtk_builder_get_widget(builder,"Window");
window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
window->DeletionTree = yon_gtk_builder_get_widget(builder,"DeletionTree");
window->DeleteCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"DeleteCell"));
window->DeleteHomeCell = GTK_CELL_RENDERER(gtk_builder_get_object(builder,"DeleteHomeCell"));
window->list = GTK_LIST_STORE(gtk_builder_get_object(builder,"liststore1"));
gtk_window_set_title(GTK_WINDOW(window->Window),DELETE_CONFIRMATION_TITLE_LABEL);
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->DeleteCell),"toggled",G_CALLBACK(on_delete_confirmation_delete_check),window);
g_signal_connect(G_OBJECT(window->DeleteHomeCell),"toggled",G_CALLBACK(on_delete_confirmation_delete_home_check),window);
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"DeleteConfirmationWindow");
return window;
}
void yon_delete_confirmation_open(main_window *widgets){
yon_confirmation_window *window = yon_delete_confirmation_new();
GtkTreeIter iter,itar;
dictionary *dict = NULL;
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_delete_confirmation_save),dict);
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
GList *list = gtk_tree_selection_get_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&model);
int chosen_size=0;
config_str chosen = NULL;
for (int i=0;i<g_list_length(list);i++){
char *current;
gtk_tree_model_get_iter(model,&iter,(GtkTreePath*)g_list_nth_data(list,i));
gtk_tree_model_get(model,&iter,2,&current,-1);
yon_char_parsed_add_or_create_if_exists(chosen,&chosen_size,current);
}
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->UsersList),&iter);
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->UsersList),&iter)){
char *name,*parameters,*homedir=NULL;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->UsersList),&iter,2,&name,6,&parameters,-1);
if (strstr(parameters,"--home-dir")){
int size;
config_str parsed = yon_char_parse(parameters,&size," ");
for (int i=0;i<size-1;i++){
if (!strcmp(parsed[i],"--home-dir")){
homedir = yon_char_new(parsed[i+1]);
break;
}
}
yon_char_parsed_free(parsed,size);
}
int status=0;
if (homedir) status=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,2,homedir,3,0,4,status,-1);
free(name);
free(parameters);
free(homedir);
}
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));
window->Window = yon_gtk_builder_get_widget(builder,"Window");
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
window->SambaCheck = yon_gtk_builder_get_widget(builder,"SambaSaveCheck");
window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
gtk_widget_show(window->Window);
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"savingSettingsWindow");
char *string = yon_config_get_by_key("SAVE_ROOTCOPY_CHANGES");
if (!yon_char_is_empty(string)&&strstr(string,"/var/lib/samba")){
asmeron commented 2 years ago
Review

"/var/lib/samba"
В отдельную переменную, как опция для внешнего параметра, зачем один и то-же кусок повторяется в разных местах кода минимум 10 раз, тем более это опция внешнего параметра для ubconfig.
Это относится и к остальным параметрам внешним.

"/var/lib/samba" В отдельную переменную, как опция для внешнего параметра, зачем один и то-же кусок повторяется в разных местах кода минимум 10 раз, тем более это опция внешнего параметра для ubconfig. Это относится и к остальным параметрам внешним.
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->SambaCheck),1);
}
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"savemode",SYSTEM_SAVEMODE_LABEL,BACKGROUND_IMAGE_INFO_TYPE);
return window;
}
void on_saving_settings_open(GtkWidget *self, main_window *widgets){
yon_savasettings_window *window = yon_saving_settings_new();
gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window));
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_saving_settings_save),window);
}
void on_password_combo_changed(GtkComboBox *self, GtkWidget *target){
gtk_widget_set_sensitive(target,gtk_combo_box_get_active(self)>1);
}
@ -209,15 +402,17 @@ void on_groups_multiple_clicked(GtkWidget *self, GtkEntry *output_target){
}
void on_passwords_encrypt(){
int pid = fork();
if (!pid){
exit(system(encrypt_passwords_command));
}
}
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();
int active = gtk_combo_box_get_active(combo);
if (active == 2)
gtk_widget_hide(window->HashBox);
else if (active==3)
gtk_widget_hide(window->PasswordBox);
dictionary *dict = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
yon_dictionary_add_or_create_if_exists_with_data(dict,"target",output_target);
@ -266,9 +461,13 @@ void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window
} else {
yon_config_register("ADDADM","users","no");
}
char *hash = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->PasswordHashCombo));
if (!yon_char_is_empty(hash)){
yon_config_register("HASHPASSWD","users",hash);
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordHashCombo))!=0){
char *hash = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->PasswordHashCombo));
if (!yon_char_is_empty(hash)){
yon_config_register("HASHPASSWD","users",hash);
}
}else {
yon_config_remove_by_key("HASHPASSWD");
}
}
@ -300,13 +499,36 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
window->RootPasswordEntry=yon_gtk_builder_get_widget(builder,"RootPasswordEntry");
window->RootPasswordButton=yon_gtk_builder_get_widget(builder,"RootPasswordButton");
window->PasswordHashCombo=yon_gtk_builder_get_widget(builder,"PasswordHashCombo");
window->EncryptAllPasswordsButton=yon_gtk_builder_get_widget(builder,"EncryptAllPasswordsButton");
window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
window->AcceptButton=yon_gtk_builder_get_widget(builder,"AcceptButton");
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"AdditionalSettingsWindow");
gtk_window_set_title(GTK_WINDOW(window->Window),ADDITIONAL_SETTINGS_TITLE_LABEL);
int hash_size=0;
config_str hash_algos = yon_file_open(hash_list_path,&hash_size);
if (main_config.hash_default_id==-1){
int size;
config_str ret = yon_config_load(get_default_hash_command,&size);
if (size>0){
char *hash = ret[0];
if (hash[strlen(hash)-1]=='\n') hash[strlen(hash)-1]='\0';
for (int i=0;i<hash_size;i++){
if (hash_algos[i][0]!='!'){
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,";");
if (!strcmp(hash,parsed[0])){
char *def_settings = yon_char_new(parsed[1]);
char *def = yon_char_divide_search(def_settings," ",-1);
free(def_settings);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),yon_char_unite(DEFAULT_USER_LABEL," (",def,")",NULL));
}
}
}
}
}
for (int i=1;i<hash_size;i++){
if (hash_algos[i][0]!='!'){
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
@ -343,7 +565,6 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->PasswordHashCombo),hash);
}
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_additional_settings_save),window);
dictionary *default_dict=NULL;
@ -356,6 +577,8 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
g_signal_connect(G_OBJECT(window->DefaultPasswordButton),"clicked",G_CALLBACK(on_password_change),default_dict);
g_signal_connect(G_OBJECT(window->RootPasswordButton),"clicked",G_CALLBACK(on_password_change),root_dict);
g_signal_connect(G_OBJECT(window->EncryptAllPasswordsButton),"clicked",G_CALLBACK(on_passwords_encrypt),NULL);
g_signal_connect(G_OBJECT(window->RootPasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->RootPasswordButton);
g_signal_connect(G_OBJECT(window->PasswordHashCombo),"changed",G_CALLBACK(on_hash_changed),window);
g_signal_connect(G_OBJECT(window->DefaultPasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->DefaultPasswordButton);
@ -432,6 +655,7 @@ void on_group_save(GtkWidget *self, dictionary *dict){
char *gid = NULL;
char *non_unique = NULL;
char *gsystem = NULL;
char *admins = NULL;
char *password = NULL;
int gid_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
if (gid_active){
@ -459,6 +683,7 @@ void on_group_save(GtkWidget *self, dictionary *dict){
return;
}
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";
@ -469,11 +694,19 @@ void on_group_save(GtkWidget *self, dictionary *dict){
gsystem=" --system";
} else gsystem="";
int shutdown_sync_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->GroupaddShutdownCheck));
if (shutdown_sync_active){
yon_config_register(GROUPADD_SYNC(group_name),"users","shutdown");
} else {
yon_config_remove_by_key(GROUPADD_SYNC(group_name));
}
password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
final_string = yon_char_unite(yon_char_return_if_exist(group_users,"x"),
":",yon_char_return_if_exist(gid,"x"),
":",yon_char_return_if_exist(non_unique,""),
yon_char_return_if_exist(gsystem,""),
":",yon_char_return_if_exist(admins,"x"),
":",yon_char_return_if_exist(password,"x"),
NULL);
yon_config_register(GROUPADD(group_name),"users",final_string);
@ -504,6 +737,9 @@ ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group
window->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
window->ChangePasswordButton=yon_gtk_builder_get_widget(builder,"ChangePasswordButton");
window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel");
window->AdminGroupsEntry=yon_gtk_builder_get_widget(builder,"AdminGroupsEntry");
window->AdminGroupsButton=yon_gtk_builder_get_widget(builder,"AdminGroupsButton");
window->GroupaddShutdownCheck=yon_gtk_builder_get_widget(builder,"GroupaddShutdownCheck");
gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),GROUPS_TITLE_LABEL);
@ -517,8 +753,13 @@ ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group
g_signal_connect(G_OBJECT(window->PasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->ChangePasswordButton);
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->UserAdditionalGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->userGroupsEntry);
g_signal_connect(G_OBJECT(window->AdminGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->AdminGroupsEntry);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(on_GID_update),window);
g_signal_connect(G_OBJECT(window->SystemGroupCheck),"toggled",G_CALLBACK(on_GID_update),window);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button),window->SystemGroupCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->SystemGroupCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button_inversed),window->UnuniqueGIDCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UnuniqueGIDCheck);
return window;
}
@ -629,7 +870,9 @@ void on_password_changed(GtkEntry *self, ubl_settings_usergroups_password_window
char *self_text = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
char *pair_text = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepeatPasswordEntry));
if ((!yon_char_is_empty(self_text)&&!yon_char_is_empty(pair_text))&&strcmp(self_text,pair_text)){
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),PASSWORD_MISMATCH_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"password_mismatch",PASSWORD_MISMATCH_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} else if (strlen(self_text)<main_config.password_min_length){
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"password_short",PASSWORD_SHORT_LABEL(yon_char_from_int(main_config.password_min_length)),BACKGROUND_IMAGE_FAIL_TYPE);
} else {
yon_ubl_status_box_despawn_infinite(GTK_CONTAINER(window->StatusBox));
}
@ -638,18 +881,16 @@ void on_password_changed(GtkEntry *self, ubl_settings_usergroups_password_window
void on_password_accept(GtkWidget *self, dictionary *dict){
ubl_settings_usergroups_password_window *window = yon_dictionary_get_data(dict->first,ubl_settings_usergroups_password_window*);
GtkEntry *entry = yon_dictionary_get_data(dict->first->next,GtkEntry*);
if (gtk_widget_get_visible(window->HashBox)){
char *pasted_hash = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry));
if (yon_char_is_empty(pasted_hash)){
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
return;
} else {
char *pasted_hash = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry));
if (!yon_char_is_empty(pasted_hash)){
gtk_entry_set_text(entry,pasted_hash);
}
} else {
char *password = yon_char_new((char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry)));
char *password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
if (yon_char_is_empty(password)){
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"password_empty",EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
return;
} else if (password[0]=='%'&&password[1]=='%'){
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"password_wrong",EMPTY_IMPORTANT_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
if (strlen(password)<main_config.password_min_length){
@ -658,13 +899,15 @@ void on_password_accept(GtkWidget *self, dictionary *dict){
}
char *password_check = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepeatPasswordEntry));
if (!strcmp(password,password_check)){
char *passwd_hash = g_malloc0(101);
FILE *fl = popen(password_hash_get_command(password),"r");
fgets(passwd_hash,100,fl);
if (passwd_hash[strlen(passwd_hash)-1]=='\n') passwd_hash[strlen(passwd_hash)-1]='\0';
gtk_entry_set_text(entry,passwd_hash);
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){
char *pasw=yon_char_append("%%",password);
free(password);
password=pasw;
}
password = yon_char_append(" . ",password);
gtk_entry_set_text(GTK_ENTRY(entry),password);
} else {
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),PASSWORD_MISMATCH_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_box_spawn_infinite(GTK_CONTAINER(window->StatusBox),"password_mismatch",PASSWORD_MISMATCH_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
}
@ -681,6 +924,7 @@ ubl_settings_usergroups_password_window *yon_ubl_settings_usergroups_password_ne
window->PasswordHashEntry=yon_gtk_builder_get_widget(builder,"PasswordHashEntry");
window->HashBox=yon_gtk_builder_get_widget(builder,"HashBox");
window->PasswordBox=yon_gtk_builder_get_widget(builder,"PasswordBox");
window->NoEncriptionCheck=yon_gtk_builder_get_widget(builder,"NoEncriptionCheck");
window->UserCancelButton=yon_gtk_builder_get_widget(builder,"UserCancelButton");
window->UserOkButton=yon_gtk_builder_get_widget(builder,"UserOkButton");
@ -741,7 +985,7 @@ void yon_system_load(ubl_settings_usergroups_system_window *window){
if (yon_gtk_list_store_find_text(window->liststore1,&iter,3,parsed[0])){
GDateTime *date = g_date_time_new_from_unix_local(atol(parsed[2]));
char *date_string;
date_string = g_date_time_format(date,"%c");
date_string = g_date_time_format(date,"%Y-%m-%d");
gtk_list_store_set(window->liststore1,&iter,8,parsed_size>2?date_string:"",9,parsed_size>7?parsed[7]:"",10,parsed_size>3?parsed[3]:"",11,parsed_size>4?parsed[4]:"",12,parsed_size>5?parsed[5]:"",13,parsed_size>2?parsed[6]:"",-1);
}
@ -843,7 +1087,7 @@ void on_UID_update(GtkWidget *self, ubl_settings_usergroups_user_window *window)
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck))){
int config_size=0;
int final_size=0;
config_str config_users = yon_config_get_all_by_key("USERADD",&config_size);
config_str config_users = yon_config_get_all_by_key("USERADD[",&config_size);
yon_char_parsed_prepend_strings(config_users,config_size,":");
config_str final = yon_char_parsed_merge(main_config.users,main_config.users_size,config_users,config_size,&final_size);
long prev_busy=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck))?0:main_config.MINGID;
@ -899,7 +1143,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){
char *create_system_user = NULL;
char *create_ununique = NULL;
char *do_not_check = NULL;
char *samba_sync = NULL;
int samba_sync = 0;
int samba_password_sync = 0;
char *deactivate = NULL;
char *extra_options = NULL;
char *useradd_boot = "";
@ -907,6 +1152,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
char *usershadow_boot = "";
char *usershadow_shutdown = "";
int uid_auto_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
if (uid_auto_active){
uid_string="";
@ -974,7 +1220,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
password_expiration_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordExpirationEntry));
if (!yon_char_is_empty(password_expiration_date)){
password_expiration_date = yon_char_from_long(window->expiration_unix);
password_expiration_date = window->expiration_unix;
}
warning_days = yon_char_from_long(gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userWarningSpin)));
@ -1014,8 +1260,19 @@ void on_user_save(GtkWidget *self, dictionary *dict){
if (do_not_check_actve)
do_not_check = " --badnames";
int samba_sync_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck));
if (samba_sync_active);
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));
if (samba_sync){
if (yon_samba_sync_get(login)==2)
yon_samba_sync_remove(login);
yon_samba_sync_add(login,NULL);
} else if (samba_password_sync){
if (yon_samba_sync_get(login)==1)
yon_samba_sync_remove(login);
yon_samba_sync_add(login,password);
} else {
yon_samba_sync_remove(login);
}
int deactivate_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck));
if (deactivate_active);
@ -1025,7 +1282,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
if (window->old_password&&strcmp(window->old_password,password)){
time_t t = time(NULL);
struct tm tm = *localtime(&t);
password_changed_date = yon_char_unite(yon_char_from_int(tm.tm_mday),".",yon_char_from_int(tm.tm_mon+1),".",yon_char_from_int(1900+tm.tm_year),NULL);
password_changed_date = yon_char_unite(yon_char_from_int(1900+tm.tm_year),"-",yon_char_from_int(tm.tm_mon+1),"-",yon_char_from_int(tm.tm_mday),NULL);
}
int useradd_boot_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UseraddBootCheck));
@ -1048,6 +1305,7 @@ void on_user_save(GtkWidget *self, dictionary *dict){
usershadow_shutdown = "shutdown";
}
char *useradd_sync_string = NULL;
useradd_sync_string = yon_char_unite(useradd_boot,!yon_char_is_empty(useradd_boot)?",":"",useradd_shutdown,NULL);
char *usershadow_sync_string = NULL;
@ -1097,12 +1355,63 @@ void on_user_save(GtkWidget *self, dictionary *dict){
on_subwindow_close(self);
}
void on_toggle_button_set_active_from_combo_box(GtkComboBox *self,ubl_settings_usergroups_user_window *window){
char *passw = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordEntry));
if (gtk_combo_box_get_active(self)<=1||(passw[0]!=' '&&passw[1]!='.'&&passw[2]!=' ')){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),0);
}else {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBACheck),1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),1);
}
}
void on_password_user_changed(GtkComboBox *self,ubl_settings_usergroups_user_window *window){
char *passw = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordEntry));
if ((passw[0]!=' '&&passw[1]!='.'&&passw[2]!=' ')){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),0);
} else {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBACheck),1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),1);
}
}
void on_toggle_button_set_active_from_toggle_button_inversed(GtkToggleButton *self, ubl_settings_usergroups_user_window *window){
char *passw = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordEntry));
if ((passw[0]==' '&&passw[1]=='.'&&passw[2]==' ')&&gtk_combo_box_get_active(GTK_COMBO_BOX(window->userPasswordCombo))>1){
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck))){
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),0);
} else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck))){
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBACheck),0);
} else {
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBACheck),1);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),1);
}
} else {
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBACheck),1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),0);
}
}
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);
gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry), g_date_time_format(date,"%c"));
window->expiration_unix=g_date_time_to_unix(date);
char *date_string = g_date_time_format(date,"%Y-%m-%d");
gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry), date_string);
window->expiration_unix=date_string;
}
ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){
@ -1139,6 +1448,7 @@ ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){
window->userCreateUnuniqueCheck=yon_gtk_builder_get_widget(builder,"userCreateUnuniqueCheck");
window->userDontCheckCheck=yon_gtk_builder_get_widget(builder,"userDontCheckCheck");
window->userSyncSAMBACheck=yon_gtk_builder_get_widget(builder,"userSyncSAMBACheck");
window->userSyncSAMBAPasswordCheck=yon_gtk_builder_get_widget(builder,"userSyncSAMBAPasswordCheck");
window->userDeactivatedCheck=yon_gtk_builder_get_widget(builder,"userDeactivatedCheck");
window->userExtraOptionsEntry=yon_gtk_builder_get_widget(builder,"userExtraOptionsEntry");
window->UserCancelButton=yon_gtk_builder_get_widget(builder,"UserCancelButton");
@ -1150,6 +1460,7 @@ ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){
window->UsershadowBootCheck=yon_gtk_builder_get_widget(builder,"UsershadowBootCheck");
window->UsershadowShutdownCheck=yon_gtk_builder_get_widget(builder,"UsershadowShutdownCheck");
window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel");
window->expiration_unix=NULL;
on_UID_update(NULL,window);
int shell_size=0;
@ -1190,6 +1501,17 @@ ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){
g_signal_connect(G_OBJECT(window->userCreateSystemCheck),"toggled",G_CALLBACK(on_UID_update),window);
g_signal_connect(G_OBJECT(window->userGroupsCheck),"toggled",G_CALLBACK(on_user_login_update),window);
g_signal_connect(G_OBJECT(window->userLoginEntry),"changed",G_CALLBACK(on_user_login_update),window);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->userCreateSystemCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button),window->userCreateSystemCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userCreateUnuniqueCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button_inversed),window->userCreateUnuniqueCheck);
g_signal_connect(G_OBJECT(window->userSyncSAMBACheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userSyncSAMBAPasswordCheck);
g_signal_connect(G_OBJECT(window->userSyncSAMBAPasswordCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userSyncSAMBACheck);
g_signal_connect(G_OBJECT(window->userSyncSAMBACheck),"toggled",G_CALLBACK(on_toggle_button_set_active_from_toggle_button_inversed),window);
g_signal_connect(G_OBJECT(window->userSyncSAMBAPasswordCheck),"toggled",G_CALLBACK(on_toggle_button_set_active_from_toggle_button_inversed),window);
g_signal_connect(G_OBJECT(window->userPasswordCombo),"changed",G_CALLBACK(on_toggle_button_set_active_from_combo_box),window);
g_signal_connect(G_OBJECT(window->userPasswordCombo),"changed",G_CALLBACK(on_toggle_button_set_active_from_combo_box),window);
g_signal_connect(G_OBJECT(window->userPasswordEntry),"changed",G_CALLBACK(on_password_user_changed),window);
return window;
}
@ -1245,103 +1567,110 @@ void on_main_edit(GtkWidget *self, main_window *widgets){
gtk_tree_model_get(GTK_TREE_MODEL(widgets->UsersList),&iter,2,&name,-1);
char *parameter_string = yon_config_get_by_key(USERADD(name));
int parsed_size=0;
if (parameter_string[0]=='\"') yon_char_divide(parameter_string,0);
if (parameter_string[strlen(parameter_string)-1]=='\"') parameter_string[strlen(parameter_string)-1]='\0';
config_str parameters = yon_char_parse(parameter_string,&parsed_size,":");
gtk_entry_set_text(GTK_ENTRY(window->userLoginEntry), name);
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry), name);
gtk_entry_set_text(GTK_ENTRY(window->userUserNameEntry), parsed_size>0?parameters[0]:"");
if (parsed_size>1){
if (strcmp(parameters[1],"x")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0);
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry), parsed_size>1?parameters[1]:"");
if (parameter_string){
if (parameter_string[0]=='\"') yon_char_divide(parameter_string,0);
if (parameter_string[strlen(parameter_string)-1]=='\"') parameter_string[strlen(parameter_string)-1]='\0';
config_str parameters = yon_char_parse(parameter_string,&parsed_size,":");
gtk_entry_set_text(GTK_ENTRY(window->userLoginEntry), name);
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry), name);
gtk_entry_set_text(GTK_ENTRY(window->userUserNameEntry), parsed_size>0?parameters[0]:"");
if (parsed_size>1){
if (strcmp(parameters[1],"x")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck),0);
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry), parsed_size>1?parameters[1]:"");
}
}
}
if (parsed_size>2){
if (!strcmp(parameters[2],"x"))
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck),1);
else
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry), parsed_size>2?parameters[2]:"");
}
if (parsed_size>3){
if (strcmp(parameters[3],"x"))
gtk_entry_set_text(GTK_ENTRY(window->userAdditionalGroupsEntry), parsed_size>3?parameters[3]:"");
if (parsed_size>2){
if (!strcmp(parameters[2],"x"))
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck),1);
else
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry), parsed_size>2?parameters[2]:"");
}
if (parsed_size>3){
if (strcmp(parameters[3],"x"))
gtk_entry_set_text(GTK_ENTRY(window->userAdditionalGroupsEntry), parsed_size>3?parameters[3]:"");
}
if (parsed_size>4&&!yon_char_is_empty(parameters[4])){
int params_size;
config_str parameters_substring = yon_char_parse(parameters[4],&params_size," ");
for (int i=0;i<params_size;i++){
if (!strcmp(parameters_substring[i],"--home-dir")){
gtk_entry_set_text(GTK_ENTRY(window->userHomeEntry),parameters_substring[i+1]);
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userHomeCombo),2);
i++;
} else if (!strcmp(parameters_substring[i],"--shell")||!strcmp(parameters_substring[i],"-s")){
int active = yon_gtk_combo_box_text_find(window->userShellCombo,parameters_substring[i+1]);
if (!active){
gtk_entry_set_text(GTK_ENTRY(window->userShellEntry),parameters_substring[i+1]);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->userShellCombo),"Set");
}
if (parsed_size>4&&!yon_char_is_empty(parameters[4])){
int params_size;
config_str parameters_substring = yon_char_parse(parameters[4],&params_size," ");
for (int i=0;i<params_size;i++){
if (!strcmp(parameters_substring[i],"--home-dir")){
gtk_entry_set_text(GTK_ENTRY(window->userHomeEntry),parameters_substring[i+1]);
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userHomeCombo),2);
i++;
} else if (!strcmp(parameters_substring[i],"--shell")||!strcmp(parameters_substring[i],"-s")){
int active = yon_gtk_combo_box_text_find(window->userShellCombo,parameters_substring[i+1]);
if (!active){
gtk_entry_set_text(GTK_ENTRY(window->userShellEntry),parameters_substring[i+1]);
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->userShellCombo),"Set");
}
i++;
}else if (!strcmp(parameters_substring[i],"--system")||!strcmp(parameters_substring[i],"-r")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck),1);
}else if (!strcmp(parameters_substring[i],"--no-create-home")||!strcmp(parameters_substring[i],"-M")){
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userHomeCombo),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")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck),1);
}else if (!strcmp(parameters_substring[i],"--badnames")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck),1);
}
i++;
}else if (!strcmp(parameters_substring[i],"--system")||!strcmp(parameters_substring[i],"-r")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck),1);
}else if (!strcmp(parameters_substring[i],"--no-create-home")||!strcmp(parameters_substring[i],"-M")){
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userHomeCombo),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")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck),1);
}else if (!strcmp(parameters_substring[i],"--badnames")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck),1);
}
// gtk_entry_set_text(GTK_ENTRY(window->), parsed_size>4?parameters[4]:"");
}
// gtk_entry_set_text(GTK_ENTRY(window->), parsed_size>4?parameters[4]:"");
}
window->old_password=parameters[5];
if(parsed_size>5){
if (strcmp(parameters[5],"x")){
gtk_entry_set_text(GTK_ENTRY(window->userPasswordEntry), parsed_size>5?parameters[5]:"");
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),3);
}
}
free(parameters);
parameters=yon_char_parse(yon_config_get_by_key(USERSHADOW(name)),&parsed_size,":");
gtk_entry_set_text(GTK_ENTRY(window->userPasswordChangedEntry),parsed_size>0?parameters[0]:"");
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMinimumSpin),atol(parsed_size>1?parameters[1]:"0"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMaximumSpin),atol(parsed_size>2?parameters[2]:"0"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userWarningSpin),atol(parsed_size>3?parameters[3]:"0"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userActivitySpin),atol(parsed_size>4?parameters[4]:"0"));
if (parsed_size>5&&!yon_char_is_empty(parameters[5])){
GDateTime *date = g_date_time_new_from_unix_local(atol(parameters[5]));
gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry),g_date_time_format(date,"%c"));
}
gtk_window_set_transient_for(GTK_WINDOW(window->CreateUserWindow),GTK_WINDOW(widgets->Window));
gtk_widget_show(window->CreateUserWindow);
window->old_password=parameters[5];
if(parsed_size>5){
if (strcmp(parameters[5],"x")){
gtk_entry_set_text(GTK_ENTRY(window->userPasswordEntry), parsed_size>5?parameters[5]:"");
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userPasswordCombo),2);
}
char *useradd_sync = NULL;
useradd_sync = yon_config_get_by_key(USERADD_SYNC(name));
if (useradd_sync){
if (strstr(useradd_sync,"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UseraddBootCheck),1);
}
if (strstr(useradd_sync,"shutdown")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UseraddShutdownCheck),1);
int samba_sync = yon_samba_sync_get(name);
if (samba_sync==1){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),1);
} else if (samba_sync==2){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),1);
}
free(useradd_sync);
}
char *usershadow_sync =yon_config_get_by_key(USERSHADOW_SYNC(name));
if (usershadow_sync){
if (strstr(usershadow_sync,"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsershadowBootCheck),1);
free(parameters);
parameters=yon_char_parse(yon_config_get_by_key(USERSHADOW(name)),&parsed_size,":");
gtk_entry_set_text(GTK_ENTRY(window->userPasswordChangedEntry),parsed_size>0?parameters[0]:"");
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMinimumSpin),atol(parsed_size>1?parameters[1]:"0"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMaximumSpin),atol(parsed_size>2?parameters[2]:"0"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userWarningSpin),atol(parsed_size>3?parameters[3]:"0"));
gtk_spin_button_set_value(GTK_SPIN_BUTTON(window->userActivitySpin),atol(parsed_size>4?parameters[4]:"0"));
if (parsed_size>5&&!yon_char_is_empty(parameters[5])){
gtk_entry_set_text(GTK_ENTRY(window->userPasswordExpirationEntry),parameters[5]);
}
gtk_window_set_transient_for(GTK_WINDOW(window->CreateUserWindow),GTK_WINDOW(widgets->Window));
gtk_widget_show(window->CreateUserWindow);
char *useradd_sync = NULL;
useradd_sync = yon_config_get_by_key(USERADD_SYNC(name));
if (useradd_sync){
if (strstr(useradd_sync,"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UseraddBootCheck),1);
}
if (strstr(useradd_sync,"shutdown")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UseraddShutdownCheck),1);
}
free(useradd_sync);
}
if (strstr(usershadow_sync,"shutdown")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsershadowShutdownCheck),1);
char *usershadow_sync =yon_config_get_by_key(USERSHADOW_SYNC(name));
if (usershadow_sync){
if (strstr(usershadow_sync,"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsershadowBootCheck),1);
}
if (strstr(usershadow_sync,"shutdown")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsershadowShutdownCheck),1);
}
free(usershadow_sync);
}
free(usershadow_sync);
}
}
@ -1388,12 +1717,21 @@ void on_main_edit(GtkWidget *self, main_window *widgets){
}
if (size>3){
if (strcmp(parsed[3],"")&&strcmp(parsed[3],"x")){
gtk_entry_set_text(GTK_ENTRY(window->PasswordEntry),parsed[3]);
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),3);
gtk_entry_set_text(GTK_ENTRY(window->AdminGroupsEntry),parsed[3]);
}
}
if (size>4){
if (strcmp(parsed[4],"")&&strcmp(parsed[4],"x")){
gtk_entry_set_text(GTK_ENTRY(window->PasswordEntry),parsed[4]);
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),2);
} else {
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordCombo),1);
}
}
char *sync = yon_config_get_by_key(GROUPADD_SYNC(name));
if (sync){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->GroupaddShutdownCheck),1);
}
} else {
yon_ubl_status_box_render(LOADING_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
}
@ -1413,19 +1751,7 @@ void on_main_delete(GtkWidget *self, main_window *widgets){
data->function=NULL;
data->data=NULL;
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){
model = GTK_TREE_MODEL(widgets->UsersList);
cur_tree=widgets->UsersTree;
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,2,&name,-1);
data->action_text=DELETE_CONFIRMATION_LABEL("user",name);
if (yon_confirmation_dialog_call(self,data)==GTK_RESPONSE_ACCEPT){
yon_config_remove_by_key(USERADD(name));
yon_config_remove_by_key(USERADD_SYNC(name));
yon_config_remove_by_key(USERSHADOW(name));
gtk_list_store_remove(GTK_LIST_STORE(model),&iter);
}
}
yon_delete_confirmation_open(widgets);
} else {
model = GTK_TREE_MODEL(widgets->GroupsList);
cur_tree=widgets->GroupsTree;
@ -1465,11 +1791,14 @@ void config_init(){
main_config.lock_save_local=0;
main_config.groups_size=0;
main_config.load_mode=1;
main_config.hash_default_id=-1;
main_config.groups = yon_file_open(groups_path,&main_config.groups_size);
main_config.users = yon_file_open(users_path,&main_config.users_size);
main_config.users_list=NULL;
main_config.groups_list=NULL;
main_config.password_min_length=6;
main_config.sync_users = NULL;
main_config.sync_size=0;
int login_size;
config_str login_defs = yon_file_open(uid_path,&login_size);
for (int i=0;i<login_size;i++){
@ -1516,19 +1845,15 @@ void on_selection_changed(GtkWidget *self, main_window *widgets){
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==0){
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&model,&iter)){
gtk_widget_set_sensitive(widgets->DeleteButton,1);
gtk_widget_set_sensitive(widgets->EditButton,1);
} else {
gtk_widget_set_sensitive(widgets->DeleteButton,0);
gtk_widget_set_sensitive(widgets->EditButton,0);
}
} else {
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_widget_set_sensitive(widgets->DeleteButton,1);
gtk_widget_set_sensitive(widgets->EditButton,1);
} else {
gtk_widget_set_sensitive(widgets->DeleteButton,0);
gtk_widget_set_sensitive(widgets->EditButton,0);
}
}
@ -1539,19 +1864,15 @@ void on_notebook_page_changed(GtkWidget *self, GtkWidget *page, int num, main_wi
if (num==0){
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&model,&iter)){
gtk_widget_set_sensitive(widgets->DeleteButton,1);
gtk_widget_set_sensitive(widgets->EditButton,1);
} else {
gtk_widget_set_sensitive(widgets->DeleteButton,0);
gtk_widget_set_sensitive(widgets->EditButton,0);
}
} else {
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_widget_set_sensitive(widgets->DeleteButton,1);
gtk_widget_set_sensitive(widgets->EditButton,1);
} else {
gtk_widget_set_sensitive(widgets->DeleteButton,0);
gtk_widget_set_sensitive(widgets->EditButton,0);
}
}
@ -1583,6 +1904,7 @@ main_window *yon_main_window_complete(main_window *widgets){
widgets->UsersTree=yon_gtk_builder_get_widget(builder,"UsersTree");
widgets->GroupsTree=yon_gtk_builder_get_widget(builder,"GroupsTree");
widgets->MainNotebook=yon_gtk_builder_get_widget(builder,"MainNotebook");
widgets->SavingSettingsButton=yon_gtk_builder_get_widget(builder,"SavingSettingsButton");
gtk_style_context_add_class(gtk_widget_get_style_context(widgets->DocumentationMenuItem),"menuitemmiddlemargin");
@ -1608,6 +1930,7 @@ main_window *yon_main_window_complete(main_window *widgets){
g_signal_connect(G_OBJECT(widgets->button2),"clicked",G_CALLBACK(on_ubl_settings_usergroups_additional_settings_open),widgets);
g_signal_connect(G_OBJECT(widgets->button1),"clicked",G_CALLBACK(on_settings_usergroups_system_open),widgets);
g_signal_connect(G_OBJECT(widgets->UpdateButton),"clicked",G_CALLBACK(on_config_update),widgets);
g_signal_connect(G_OBJECT(widgets->SavingSettingsButton),"clicked",G_CALLBACK(on_saving_settings_open),widgets);
g_signal_connect(G_OBJECT(widgets->SaveMenuItem),"activate",G_CALLBACK(on_config_save),widgets);
g_signal_connect(G_OBJECT(widgets->UsersTree),"cursor-changed",G_CALLBACK(on_selection_changed),widgets);
g_signal_connect(G_OBJECT(widgets->GroupsTree),"cursor-changed",G_CALLBACK(on_selection_changed),widgets);
@ -1681,7 +2004,7 @@ int main(int argc, char *argv[]){
if(optarg)
main_config.load_socket_id=atoi(optarg);
break;
case 'c': system(yon_char_unite("rm -rfd ", yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",NULL));
case 'c': system(remove_config_dir_command);
break;
case 1:
main_config.lock_help=1;

@ -7,6 +7,7 @@
#include <getopt.h>
#include <libintl.h>
#include <limits.h>
#include <sys/wait.h>
#include <libublsettings.h>
#include <libublsettings-gtk3.h>
#include <libublsettingsui-gtk3.h>
@ -26,6 +27,8 @@
#define glade_path_ubl_settings_usergroups_password "/com/ublinux/ui/ubl-settings-usergroups-password.glade"
#define glade_path_ubl_settings_usergroups_system "/com/ublinux/ui/ubl-settings-usergroups-system.glade"
#define glade_path_ubl_settings_usergroups_user "/com/ublinux/ui/ubl-settings-usergroups-user.glade"
#define glade_path_ubl_settings_usergroups_savesettings "/com/ublinux/ui/ubl-settings-usergroups-savesettings.glade"
#define glade_path_ubl_settings_usergroups_confirmation "/com/ublinux/ui/ubl-settings-usergroups-confirmation.glade"
#define banner_path "/com/ublinux/images/ubl-settings-usergroups-banner.png"
#define CssPath "/com/ublinux/css/ubl-settings-usergroups.css"
@ -34,9 +37,13 @@
#define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-usergroups"
#define clear_config_both_command "ubconfig remove TEMP_SECTION TEMP_PATAMETER"
#define encrypt_passwords_command "/usr/lib/ublinux/functions globalconf_convert_pass_plain_to_hash"
#define get_default_hash_command "ubconfig --raw --source default get [users] HASHPASSWD"
#define clear_config_global_command "ubconfig --target global remove TEMP_SECTION TEMP_PATAMETER"
#define clear_config_local_command "ubconfig --target system remove TEMP_SECTION TEMP_PATAMETER"
#define remove_config_dir_command yon_char_unite("rm -rfd ", yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",NULL)
#define samba_sync_command(user) yon_char_unite("sudo smbpasswd -Las ",user,NULL)
#define samba_sync_password_command(user, password) yon_char_unite("(echo \"",password,"\"; echo \"",password,"\") | sudo smbpasswd -Las ",user,NULL)
#define groups_path "/etc/group"
#define users_path "/etc/passwd"
@ -52,6 +59,7 @@
#define USERSHADOW(user) yon_char_unite("USERSHADOW[",user,"]",NULL)
#define USERADD_SYNC(user) yon_char_unite("USERADD_SYNC[",user,"]",NULL)
#define USERSHADOW_SYNC(user) yon_char_unite("USERSHADOW_SYNC[",user,"]",NULL)
#define GROUPADD_SYNC(user) yon_char_unite("GROUPADD_SYNC[",user,"]",NULL)
#define password_hash_get_command(passwd) yon_char_append("mkpasswd2 ",passwd)
@ -91,6 +99,9 @@ typedef struct {
int password_min_length;
int hash_default_id;
config_str sync_users;
int sync_size;
} config;
typedef struct {
@ -137,6 +148,7 @@ typedef struct {
GtkWidget *UsersTree;
GtkWidget *GroupsTree;
GtkWidget *MainNotebook;
GtkWidget *SavingSettingsButton;
} main_window;
@ -164,6 +176,7 @@ typedef struct{
GtkWidget *PasswordHashCombo;
GtkWidget *CancelButton;
GtkWidget *AcceptButton;
GtkWidget *EncryptAllPasswordsButton;
} ubl_settings_usergroups_additional_settings_window;
typedef struct{
@ -183,6 +196,9 @@ typedef struct{
GtkWidget *PasswordEntry;
GtkWidget *ChangePasswordButton;
GtkWidget *userTitleNameLabel;
GtkWidget *AdminGroupsEntry;
GtkWidget *AdminGroupsButton;
GtkWidget *GroupaddShutdownCheck;
} ubl_settings_usergroups_group_creation_window;
typedef struct{
@ -205,6 +221,7 @@ typedef struct{
GtkWidget *PasswordHashEntry;
GtkWidget *HashBox;
GtkWidget *PasswordBox;
GtkWidget *NoEncriptionCheck;
} ubl_settings_usergroups_password_window;
typedef struct{
@ -260,12 +277,31 @@ typedef struct{
GtkWidget *UsershadowBootCheck;
GtkWidget *UsershadowShutdownCheck;
GtkWidget *userTitleNameLabel;
GtkWidget *userSyncSAMBAPasswordCheck;
long expiration_unix;
char *expiration_unix;
char *old_password;
} ubl_settings_usergroups_user_window;
typedef struct {
GtkWidget *Window;
GtkWidget *StatusBox;
GtkWidget *CancelButton;
GtkWidget *AcceptButton;
GtkWidget *SambaCheck;
} yon_savasettings_window;
typedef struct {
GtkWidget *Window;
GtkWidget *StatusBox;
GtkWidget *CancelButton;
GtkWidget *AcceptButton;
GtkWidget *DeletionTree;
GtkListStore *list;
GtkCellRenderer *DeleteCell;
GtkCellRenderer *DeleteHomeCell;
} yon_confirmation_window;
ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_additional_settings_new();

@ -15,6 +15,7 @@
#define LOGIN_LABEL _("Login")
#define PASSWORD_LABEL _("Password")
#define USER_NAME_LABEL _("User\nname")
#define APPLY_LABEL _("Apply")
#define UID_USER_LABEL _("User UID:")
#define USERNAME_USER_LABEL _("User name (description):")
@ -49,6 +50,7 @@
#define EDIT_LABEL _("Edit")
#define REMOVE_LABEL _("Remove")
#define UPDATE_LABEL _("Update users and groups")
#define SAVING_CONFIGURATION_LABEL _("Additional saving configuration")
#define DELETE_CONFIRMATION_LABEL(type,target) yon_char_unite(_(yon_char_append("Are you sure want to delete ",type)), " '",target,"'?",NULL)
@ -83,6 +85,9 @@
#define CREATE_SYSTEM_GROUP_LABEL _("Create system group")
#define ENCRYPTED_PASSWORD_LABEL _("Encrypted password")
#define ADDITIONAL_CONFIGURATION_LABEL _("Additional configuration")
#define GROUPADD_SYNC_LABEL _("Group configuration synchronization")
#define GROUPADD_SHUTDOWN_LABEL _("When shutting down the system, save the group into the configuration")
#define ADMINISTRATORS_LABEL _("Group administrators:")
//ubl-settings-usergroups-group.glade
#define DEFAULT_GROUPS_TITLE_LABEL _("Default groups")
@ -140,6 +145,9 @@
#define LOGIN_TOOLTIP_NAME_LABEL _("login_name")
#define GROUP_TOOLTIP_NAME_LABEL _("group_name")
#define USER__NAME_LABEL _("User name")
#define SAMBA_SYNC_USER_LABEL _("Sync user")
#define SAMBA_SYNC_USER_PASSWORD_LABEL _("Sync user with password")
#define ENCRYPT_PASSWORDS_LABEL _("Encrypt all passwords")
#define USER_CONFIIGURATION_LABEL _("User configuration")
#define USERADD_SYNC_LABEL _("User configuration synchronization")
@ -156,3 +164,17 @@
//ubl-settings-usergroups-password.glade
#define PASSWORD_REPEAT_LABEL _("Repeat password:")
#define PASSWORD_HASH_LABEL _("Password hash:")
#define PASSWORD_NO_ENCRYPT_LABEL _("Do not encrypt password")
//ubl-settings-usergroups-savesettings.glade
#define SAVESETTINGS_TITLE_LABEL _("Additional configuration of service parameter saving")
#define SAMBA_ROOTCOPY_LABEL _("At every system shutdown save changes of (root)/var/lib/samba\ninto (hd)/ublinux-data/rootcopy")
#define SYSTEM_SAVEMODE_LABEL _("For system save mode \"Sandbox\"")
//ubl-settings-usergroups-confirmation.glade
#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")

@ -23,6 +23,11 @@
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.edit-symbolic</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.lock-symbolic</property>
</object>
<object class="GtkWindow" id="Window">
<property name="width-request">600</property>
<property name="can-focus">False</property>
@ -280,7 +285,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">2</property>
</packing>
</child>
<child>
@ -329,6 +334,21 @@
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="EncryptAllPasswordsButton">
<property name="label" translatable="yes">Encrypt all passwords</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="halign">end</property>
<property name="image">image5</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">

@ -0,0 +1,228 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="ubl-settings-usergroups">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-usergroups.css -->
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.cancel-symbolic</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.accept-symbolic</property>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gboolean1 -->
<column type="gboolean"/>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
<!-- column-name gboolean2 -->
<column type="gboolean"/>
<!-- column-name gboolean3 -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkWindow" id="Window">
<property name="width-request">450</property>
<property name="height-request">300</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="default-width">450</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-top">20</property>
<property name="margin-bottom">20</property>
<property name="icon-name">dialog-question-symbolic</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Confirm user(-s) deletion:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="DeletionTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">liststore1</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Chosen</property>
<child>
<object class="GtkCellRendererToggle" id="DeleteCell"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">User</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Home directory</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Delete home directory</property>
<child>
<object class="GtkCellRendererToggle" id="DeleteHomeCell"/>
<attributes>
<attribute name="sensitive">4</attribute>
<attribute name="active">3</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child type="title">
<object class="GtkLabel" id="userTitleNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">User deletion</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="AcceptButton">
<property name="label" translatable="yes">Apply</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

@ -13,6 +13,11 @@
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.edit-symbolic</property>
</object>
<object class="GtkImage" id="image3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.profile-settings-symbolic</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -51,191 +56,73 @@
</packing>
</child>
<child>
<object class="GtkBox">
<object class="GtkNotebook">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="can-focus">True</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group id:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="GIDAutoCheck">
<property name="label" translatable="yes">Automatically</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="userUIDEntry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group name:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="userLoginEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="secondary-icon-name">com.ublinux.ubl-settings-usergroups.profile-symbolic</property>
<property name="placeholder-text" translatable="yes">group_name</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group users:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="userGroupsEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="AdditionalGroupsButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="label-xalign">0</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="UnuniqueGIDCheck">
<property name="label" translatable="yes">Create group with ununique GID</property>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group id:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="GIDAutoCheck">
<property name="label" translatable="yes">Automatically</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="active">True</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="userUIDEntry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="input-purpose">number</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">4</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -243,30 +130,17 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="SystemGroupCheck">
<property name="label" translatable="yes">Create system group</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Password:</property>
<property name="label" translatable="yes">Group name:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@ -275,16 +149,11 @@
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="PasswordCombo">
<object class="GtkEntry" id="userLoginEntry">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Default</item>
<item translatable="yes">No password required</item>
<item translatable="yes">Set a password</item>
<item translatable="yes">Encrypted password</item>
</items>
<property name="can-focus">True</property>
<property name="secondary-icon-name">com.ublinux.ubl-settings-usergroups.profile-symbolic</property>
<property name="placeholder-text" translatable="yes">group_name</property>
</object>
<packing>
<property name="expand">True</property>
@ -292,15 +161,35 @@
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkEntry" id="PasswordEntry">
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group users:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="userGroupsEntry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="visibility">False</property>
<property name="invisible-char">*</property>
<property name="secondary-icon-name">com.ublinux.ubl-settings-usergroups.key-symbolic</property>
<property name="placeholder-text" translatable="yes">********</property>
</object>
<packing>
<property name="expand">True</property>
@ -309,12 +198,11 @@
</packing>
</child>
<child>
<object class="GtkButton" id="ChangePasswordButton">
<object class="GtkButton" id="AdditionalGroupsButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<property name="image">image1</property>
<style>
<class name="thin"/>
</style>
@ -333,58 +221,322 @@
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="UnuniqueGIDCheck">
<property name="label" translatable="yes">Create group with ununique GID</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="SystemGroupCheck">
<property name="label" translatable="yes">Create system group</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group administrators:</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="AdminGroupsEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="AdminGroupsButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image3</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Password:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="PasswordCombo">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="active">0</property>
<items>
<item translatable="yes">Default</item>
<item translatable="yes">No password required</item>
<item translatable="yes">Set a password</item>
</items>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="PasswordEntry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="visibility">False</property>
<property name="invisible-char">*</property>
<property name="secondary-icon-name">com.ublinux.ubl-settings-usergroups.key-symbolic</property>
<property name="placeholder-text" translatable="yes">********</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkButton" id="ChangePasswordButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Additional configuration</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Extra options:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="groupExtraOptionsEntry">
<property name="visible">True</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<child type="label">
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Additional configuration</property>
<property name="label" translatable="yes">Main</property>
</object>
<packing>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel">
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Extra options:</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkCheckButton" id="GroupaddShutdownCheck">
<property name="label" translatable="yes">When shutting down the system, save the group into the configuration</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Group configuration synchronization</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="groupExtraOptionsEntry">
<child type="tab">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Syncronization</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="tab-fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">1</property>
</packing>
</child>
</object>

@ -163,6 +163,20 @@
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="NoEncriptionCheck">
<property name="label" translatable="yes">Do not encrypt password</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@ -199,7 +213,7 @@
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
</object>

@ -0,0 +1,146 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.cancel-symbolic</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.accept-symbolic</property>
</object>
<object class="GtkWindow" id="Window">
<property name="width-request">450</property>
<property name="height-request">300</property>
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="default-width">450</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkCheckButton" id="SambaSaveCheck">
<property name="label" translatable="yes">At every system shutdown save changes of (root)/var/lib/samba
into (hd)/ublinux-data/rootcopy</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Samba</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child type="title">
<object class="GtkLabel" id="userTitleNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Additional configuration of service parameter saving</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="AcceptButton">
<property name="label" translatable="yes">Accept</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</interface>

@ -237,7 +237,6 @@
<item translatable="yes">Default</item>
<item translatable="yes">No password required</item>
<item translatable="yes">Set a password</item>
<item translatable="yes">Encrypted password</item>
</items>
</object>
<packing>
@ -323,7 +322,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
<property name="position">4</property>
</packing>
</child>
<child>
@ -392,7 +391,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">4</property>
<property name="position">5</property>
</packing>
</child>
<child>
@ -443,7 +442,7 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">5</property>
<property name="position">6</property>
</packing>
</child>
</object>
@ -469,14 +468,68 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="userSyncSAMBACheck">
<property name="label" translatable="yes">Sync with SAMBA user</property>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="userSyncSAMBACheck">
<property name="label" translatable="yes">Sync user</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="userSyncSAMBAPasswordCheck">
<property name="label" translatable="yes">Sync user with password</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">start</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label">
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">Samba</property>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
@ -703,6 +756,7 @@
<object class="GtkCheckButton" id="userCreateUnuniqueCheck">
<property name="label" translatable="yes">Create user with ununique (repeating) UID</property>
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
@ -1178,7 +1232,6 @@
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0.019999999552965164</property>
<property name="shadow-type">in</property>

@ -100,6 +100,11 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.trash-symbolic</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.save-symbolic</property>
</object>
<object class="GtkBox" id="PlugBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -224,7 +229,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<child>
<object class="GtkButton" id="DeleteButton">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Remove</property>
@ -256,6 +260,34 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<property name="position">8</property>
</packing>
</child>
<child>
<object class="GtkSeparator">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">9</property>
</packing>
</child>
<child>
<object class="GtkButton" id="SavingSettingsButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Additional saving configuration</property>
<property name="image">image4</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">10</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ubl-settings-usergroups 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-20 16:12+0600\n"
"POT-Creation-Date: 2023-05-22 16:12+0600\n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: \n"
@ -97,7 +97,7 @@ msgstr ""
msgid "Root user password:"
msgstr ""
#: source/ubl-strings.h:12 source/ubl-strings.h:26
#: source/ubl-strings.h:12 source/ubl-strings.h:27
msgid "Password hash algorythm:"
msgstr ""
@ -105,7 +105,7 @@ msgstr ""
msgid "UID"
msgstr ""
#: source/ubl-strings.h:15 source/ubl-strings.h:81
#: source/ubl-strings.h:15 source/ubl-strings.h:83
msgid "Login"
msgstr ""
@ -119,463 +119,537 @@ msgid ""
"name"
msgstr ""
#: source/ubl-strings.h:19
msgid "User UID:"
#: source/ubl-strings.h:18
msgid "Apply"
msgstr ""
#: source/ubl-strings.h:20
msgid "User name (description):"
msgid "User UID:"
msgstr ""
#: source/ubl-strings.h:21
msgid "Login:"
msgid "User name (description):"
msgstr ""
#: source/ubl-strings.h:22
msgid "Password:"
msgid "Login:"
msgstr ""
#: source/ubl-strings.h:23
msgid "Default"
msgid "Password:"
msgstr ""
#: source/ubl-strings.h:24
msgid "Main group:"
msgid "Default"
msgstr ""
#: source/ubl-strings.h:25
msgid "Main group:"
msgstr ""
#: source/ubl-strings.h:26
msgid ""
"Additional\n"
"groups"
msgstr ""
#: source/ubl-strings.h:27
#: source/ubl-strings.h:28
msgid "Sync with SAMBA user"
msgstr ""
#: source/ubl-strings.h:28
#: source/ubl-strings.h:29
msgid "Extra options:"
msgstr ""
#: source/ubl-strings.h:29
#: source/ubl-strings.h:30
msgid "Cancel"
msgstr ""
#: source/ubl-strings.h:30
#: source/ubl-strings.h:31
msgid "Ok"
msgstr ""
#: source/ubl-strings.h:32
#: source/ubl-strings.h:33
msgid "Block"
msgstr ""
#: source/ubl-strings.h:33
#: source/ubl-strings.h:34
msgid ""
"Main\n"
"group"
msgstr ""
#: source/ubl-strings.h:34
#: source/ubl-strings.h:35
msgid ""
"Additional\n"
"parameters"
msgstr ""
#: source/ubl-strings.h:35
#: source/ubl-strings.h:36
msgid ""
"Password\n"
"status"
msgstr ""
#: source/ubl-strings.h:36
#: source/ubl-strings.h:37
msgid "Users"
msgstr ""
#: source/ubl-strings.h:37
#: source/ubl-strings.h:38
msgid "GID"
msgstr ""
#: source/ubl-strings.h:38
#: source/ubl-strings.h:39
msgid ""
"Group\n"
"name"
msgstr ""
#: source/ubl-strings.h:39
#: source/ubl-strings.h:40
msgid ""
"Group\n"
"users"
msgstr ""
#: source/ubl-strings.h:40
#: source/ubl-strings.h:41
msgid "Groups"
msgstr ""
#: source/ubl-strings.h:42
#: source/ubl-strings.h:43
msgid "Password input"
msgstr ""
#: source/ubl-strings.h:43
#: source/ubl-strings.h:44
msgid "File owerview"
msgstr ""
#: source/ubl-strings.h:45
#: source/ubl-strings.h:46
msgid "Inspect users and groups in system"
msgstr ""
#: source/ubl-strings.h:46 source/ubl-strings.h:56
#: source/ubl-strings.h:47 source/ubl-strings.h:58
msgid "Additional settings"
msgstr ""
#: source/ubl-strings.h:47
#: source/ubl-strings.h:48
msgid "Shared groups configuration"
msgstr ""
#: source/ubl-strings.h:48
#: source/ubl-strings.h:49
msgid "Create new"
msgstr ""
#: source/ubl-strings.h:49
#: source/ubl-strings.h:50
msgid "Edit"
msgstr ""
#: source/ubl-strings.h:50
#: source/ubl-strings.h:51
msgid "Remove"
msgstr ""
#: source/ubl-strings.h:51
#: source/ubl-strings.h:52
msgid "Update users and groups"
msgstr ""
#: source/ubl-strings.h:53
msgid "Are you sure want to delete group"
msgstr ""
msgstr "Вы уверены, что хотите удалить группу"
#: source/ubl-strings.h:53
msgid "Are you sure want to delete user"
msgstr "Вы уверены, что хотите удалить пользователя"
#: source/ubl-strings.h:53
msgid "Additional saving configuration"
msgstr ""
#: source/ubl-strings.h:57
#: source/ubl-strings.h:59
msgid "No password required"
msgstr ""
#: source/ubl-strings.h:58
#: source/ubl-strings.h:60
msgid "Set a password"
msgstr ""
#: source/ubl-strings.h:59
#: source/ubl-strings.h:61
msgid "Endrypted password"
msgstr ""
#: source/ubl-strings.h:72
#: source/ubl-strings.h:74
msgid "Accept"
msgstr ""
#: source/ubl-strings.h:75
#: source/ubl-strings.h:77
msgid "Configure group"
msgstr ""
#: source/ubl-strings.h:76
#: source/ubl-strings.h:78
msgid "Add group"
msgstr ""
#: source/ubl-strings.h:77
#: source/ubl-strings.h:79
msgid "Group id:"
msgstr ""
#: source/ubl-strings.h:78
#: source/ubl-strings.h:80
msgid "Group name:"
msgstr ""
#: source/ubl-strings.h:79
#: source/ubl-strings.h:81
msgid "Group users:"
msgstr ""
#: source/ubl-strings.h:80
#: source/ubl-strings.h:82
msgid "Automatically"
msgstr ""
#: source/ubl-strings.h:82
#: source/ubl-strings.h:84
msgid "Create group with ununique GID"
msgstr ""
#: source/ubl-strings.h:83
#: source/ubl-strings.h:85
msgid "Create system group"
msgstr ""
#: source/ubl-strings.h:84
#: source/ubl-strings.h:86
msgid "Encrypted password"
msgstr ""
#: source/ubl-strings.h:85
#: source/ubl-strings.h:87
msgid "Additional configuration"
msgstr ""
#: source/ubl-strings.h:88
msgid "Default groups"
msgid "Group configuration synchronization"
msgstr ""
#: source/ubl-strings.h:89
msgid "Main group"
msgid "When shutting down the system, save the group into the configuration"
msgstr ""
#: source/ubl-strings.h:90
msgid "Group administrators:"
msgstr ""
#: source/ubl-strings.h:93
msgid "Default groups"
msgstr ""
#: source/ubl-strings.h:94
msgid "Main group"
msgstr ""
#: source/ubl-strings.h:95
msgid "Additional groups"
msgstr ""
#: source/ubl-strings.h:91
#: source/ubl-strings.h:96
msgid "Choose groups"
msgstr ""
#: source/ubl-strings.h:92
#: source/ubl-strings.h:97
msgid "Choose users"
msgstr ""
#: source/ubl-strings.h:95
#: source/ubl-strings.h:100
msgid "System users and groups"
msgstr ""
#: source/ubl-strings.h:96
#: source/ubl-strings.h:101
msgid "Blocked"
msgstr ""
#: source/ubl-strings.h:97
#: source/ubl-strings.h:102
msgid "Username"
msgstr ""
#: source/ubl-strings.h:98
#: source/ubl-strings.h:103
msgid ""
"Primary\n"
"group"
msgstr ""
#: source/ubl-strings.h:99
#: source/ubl-strings.h:104
msgid ""
"Home\n"
"directory"
msgstr ""
#: source/ubl-strings.h:100 source/ubl-strings.h:106
#: source/ubl-strings.h:105 source/ubl-strings.h:111
msgid "Group"
msgstr ""
#: source/ubl-strings.h:101
#: source/ubl-strings.h:106
msgid "Update the system users and groups list"
msgstr ""
#: source/ubl-strings.h:102
#: source/ubl-strings.h:107
msgid "Toggle system groups and users"
msgstr ""
#: source/ubl-strings.h:104
#: source/ubl-strings.h:109
msgid "Password mismatch"
msgstr ""
#: source/ubl-strings.h:105
#: source/ubl-strings.h:110
msgid "Password must be at least"
msgstr ""
#: source/ubl-strings.h:105
#: source/ubl-strings.h:110
msgid "characters"
msgstr ""
#: source/ubl-strings.h:107
#: source/ubl-strings.h:112
msgid ""
"Days until\n"
"warning"
msgstr ""
#: source/ubl-strings.h:108
#: source/ubl-strings.h:113
msgid ""
"Days\n"
"without activity"
msgstr ""
#: source/ubl-strings.h:109
#: source/ubl-strings.h:114
msgid ""
"Shell\n"
"path"
msgstr ""
#: source/ubl-strings.h:110
#: source/ubl-strings.h:115
msgid ""
"Password has\n"
"been changed"
msgstr ""
#: source/ubl-strings.h:111
#: source/ubl-strings.h:116
msgid ""
"Expiration\n"
"date"
msgstr ""
#: source/ubl-strings.h:112
#: source/ubl-strings.h:117
msgid ""
"Password change\n"
"interval (min)"
msgstr ""
#: source/ubl-strings.h:113
#: source/ubl-strings.h:118
msgid ""
"Password change\n"
"interval (max)"
msgstr ""
#: source/ubl-strings.h:116
#: source/ubl-strings.h:121
msgid "Add user"
msgstr ""
#: source/ubl-strings.h:117
#: source/ubl-strings.h:122
msgid "Configure user"
msgstr ""
#: source/ubl-strings.h:118
#: source/ubl-strings.h:123
msgid "Set"
msgstr ""
#: source/ubl-strings.h:119
#: source/ubl-strings.h:124
msgid "Empty important field"
msgstr ""
#: source/ubl-strings.h:120
#: source/ubl-strings.h:125
msgid "Loading has failed"
msgstr ""
#: source/ubl-strings.h:121
#: source/ubl-strings.h:126
msgid "Login name"
msgstr ""
#: source/ubl-strings.h:122
#: source/ubl-strings.h:127
msgid "Additional groups:"
msgstr ""
#: source/ubl-strings.h:123
#: source/ubl-strings.h:128
msgid "Password configuration"
msgstr ""
#: source/ubl-strings.h:124
#: source/ubl-strings.h:129
msgid "Password has been changed:"
msgstr ""
#: source/ubl-strings.h:125
#: source/ubl-strings.h:130
msgid "expiration date:"
msgstr ""
#: source/ubl-strings.h:126
#: source/ubl-strings.h:131
msgid "Password change interval: minimum"
msgstr ""
#: source/ubl-strings.h:127
#: source/ubl-strings.h:132
msgid "days, maximum"
msgstr ""
#: source/ubl-strings.h:128
#: source/ubl-strings.h:133
msgid "days"
msgstr ""
#: source/ubl-strings.h:129
#: source/ubl-strings.h:134
msgid "Days until warning:"
msgstr ""
#: source/ubl-strings.h:130
#: source/ubl-strings.h:135
msgid "Days without activity:"
msgstr ""
#: source/ubl-strings.h:131
#: source/ubl-strings.h:136
msgid "Force change at next login"
msgstr ""
#: source/ubl-strings.h:132
#: source/ubl-strings.h:137
msgid "User shell:"
msgstr ""
#: source/ubl-strings.h:133
#: source/ubl-strings.h:138
msgid "Home directory:"
msgstr ""
#: source/ubl-strings.h:134
#: source/ubl-strings.h:139
msgid "Don't set"
msgstr ""
#: source/ubl-strings.h:135
#: source/ubl-strings.h:140
msgid "Create system user"
msgstr ""
#: source/ubl-strings.h:136
#: source/ubl-strings.h:141
msgid "Create user with ununique (repeating) UID"
msgstr ""
#: source/ubl-strings.h:137
#: source/ubl-strings.h:142
msgid "Do not check login for compliance with character rules"
msgstr ""
#: source/ubl-strings.h:138
#: source/ubl-strings.h:143
msgid "Temporary deactivation"
msgstr ""
#: source/ubl-strings.h:139
#: source/ubl-strings.h:144
msgid "Save"
msgstr ""
#: source/ubl-strings.h:140
#: source/ubl-strings.h:145
msgid "login_name"
msgstr ""
#: source/ubl-strings.h:141
#: source/ubl-strings.h:146
msgid "group_name"
msgstr ""
#: source/ubl-strings.h:142
#: source/ubl-strings.h:147
msgid "User name"
msgstr ""
#: source/ubl-strings.h:144
#: source/ubl-strings.h:148
msgid "Sync user"
msgstr ""
#: source/ubl-strings.h:149
msgid "Sync user with password"
msgstr ""
#: source/ubl-strings.h:150
msgid "Encrypt all passwords"
msgstr ""
#: source/ubl-strings.h:152
msgid "User configuration"
msgstr ""
#: source/ubl-strings.h:145
#: source/ubl-strings.h:153
msgid "User configuration synchronization"
msgstr ""
#: source/ubl-strings.h:146
#: source/ubl-strings.h:154
msgid "During system startup, load the user from the configuration"
msgstr ""
#: source/ubl-strings.h:147
#: source/ubl-strings.h:155
msgid "When shutting down the system, save the user into the configuration"
msgstr ""
#: source/ubl-strings.h:148
#: source/ubl-strings.h:156
msgid "User password configuration syncronization"
msgstr ""
#: source/ubl-strings.h:149
#: source/ubl-strings.h:157
msgid ""
"During system startup, load the user's parameters from the configuration"
msgstr ""
#: source/ubl-strings.h:150
#: source/ubl-strings.h:158
msgid ""
"When shutting down the system, save the user's parameters into the "
"configuration"
msgstr ""
#: source/ubl-strings.h:152
#: source/ubl-strings.h:160
msgid "Main"
msgstr ""
#: source/ubl-strings.h:153
#: source/ubl-strings.h:161
msgid "Additional"
msgstr ""
#: source/ubl-strings.h:154
#: source/ubl-strings.h:162
msgid "Syncronization"
msgstr ""
#: source/ubl-strings.h:157
#: source/ubl-strings.h:165
msgid "Repeat password:"
msgstr ""
#: source/ubl-strings.h:158
#: source/ubl-strings.h:166
msgid "Password hash:"
msgstr ""
#: source/ubl-strings.h:167
msgid "Do not encrypt password"
msgstr ""
#: source/ubl-strings.h:170
msgid "Additional configuration of service parameter saving"
msgstr ""
#: source/ubl-strings.h:171
msgid ""
"At every system shutdown save changes of (root)/var/lib/samba\n"
"into (hd)/ublinux-data/rootcopy"
msgstr ""
#: source/ubl-strings.h:172
msgid "For system save mode \"Sandbox\""
msgstr ""
#: source/ubl-strings.h:175
msgid "User deletion"
msgstr ""
#: source/ubl-strings.h:176
msgid "Confirm user(-s) deletion:"
msgstr ""
#: source/ubl-strings.h:177
msgid "Chosen"
msgstr ""
#: source/ubl-strings.h:178
msgid "User"
msgstr ""
#: source/ubl-strings.h:179
msgid "Home directory"
msgstr ""
#: source/ubl-strings.h:180
msgid "Delete home directory"
msgstr ""

@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ubl-ubl-settings-usergroups 1.0\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-12-20 16:12+0600\n"
"POT-Creation-Date: 2023-05-22 16:12+0600\n"
"PO-Revision-Date: 2023-01-01 00:00+0600\n"
"Last-Translator: UBLinux Team <info@ublinux.com>\n"
"Language-Team: Russian - UBLinux Team <info@ublinux.com>\n"
@ -99,7 +99,7 @@ msgstr "Пароль для пользователей по умолчанию:"
msgid "Root user password:"
msgstr "Пароль пользователя root:"
#: source/ubl-strings.h:12 source/ubl-strings.h:26
#: source/ubl-strings.h:12 source/ubl-strings.h:27
msgid "Password hash algorythm:"
msgstr "Алгоритм хэширования пароля:"
@ -107,7 +107,7 @@ msgstr "Алгоритм хэширования пароля:"
msgid "UID"
msgstr "UID"
#: source/ubl-strings.h:15 source/ubl-strings.h:81
#: source/ubl-strings.h:15 source/ubl-strings.h:83
msgid "Login"
msgstr "Логин"
@ -123,31 +123,35 @@ msgstr ""
"Имя\n"
"пользователя"
#: source/ubl-strings.h:19
#: source/ubl-strings.h:18
msgid "Apply"
msgstr "Применить"
#: source/ubl-strings.h:20
msgid "User UID:"
msgstr "UID пользователя:"
#: source/ubl-strings.h:20
#: source/ubl-strings.h:21
msgid "User name (description):"
msgstr "Имя пользователя (описание):"
#: source/ubl-strings.h:21
#: source/ubl-strings.h:22
msgid "Login:"
msgstr "Логин:"
#: source/ubl-strings.h:22
#: source/ubl-strings.h:23
msgid "Password:"
msgstr "Пароль:"
#: source/ubl-strings.h:23
#: source/ubl-strings.h:24
msgid "Default"
msgstr "По умолчанию"
#: source/ubl-strings.h:24
#: source/ubl-strings.h:25
msgid "Main group:"
msgstr "Основная группа:"
#: source/ubl-strings.h:25
#: source/ubl-strings.h:26
msgid ""
"Additional\n"
"groups"
@ -155,27 +159,27 @@ msgstr ""
"Дополнительные\n"
"группы"
#: source/ubl-strings.h:27
#: source/ubl-strings.h:28
msgid "Sync with SAMBA user"
msgstr "Синхронизировать с пользователем SAMBA"
#: source/ubl-strings.h:28
#: source/ubl-strings.h:29
msgid "Extra options:"
msgstr "Дополнительные параметры:"
#: source/ubl-strings.h:29
#: source/ubl-strings.h:30
msgid "Cancel"
msgstr "Отменить"
#: source/ubl-strings.h:30
#: source/ubl-strings.h:31
msgid "Ok"
msgstr "Применить"
#: source/ubl-strings.h:32
#: source/ubl-strings.h:33
msgid "Block"
msgstr "Заблокировано"
#: source/ubl-strings.h:33
#: source/ubl-strings.h:34
msgid ""
"Main\n"
"group"
@ -183,7 +187,7 @@ msgstr ""
"Основная\n"
"группа"
#: source/ubl-strings.h:34
#: source/ubl-strings.h:35
msgid ""
"Additional\n"
"parameters"
@ -191,7 +195,7 @@ msgstr ""
"Дополнительные\n"
"параметры"
#: source/ubl-strings.h:35
#: source/ubl-strings.h:36
msgid ""
"Password\n"
"status"
@ -199,15 +203,15 @@ msgstr ""
"Статус\n"
"пароля"
#: source/ubl-strings.h:36
#: source/ubl-strings.h:37
msgid "Users"
msgstr "Пользователи"
#: source/ubl-strings.h:37
#: source/ubl-strings.h:38
msgid "GID"
msgstr "GID"
#: source/ubl-strings.h:38
#: source/ubl-strings.h:39
msgid ""
"Group\n"
"name"
@ -215,7 +219,7 @@ msgstr ""
"Имя\n"
"группы"
#: source/ubl-strings.h:39
#: source/ubl-strings.h:40
msgid ""
"Group\n"
"users"
@ -223,43 +227,43 @@ msgstr ""
"Пользователи\n"
"группы"
#: source/ubl-strings.h:40
#: source/ubl-strings.h:41
msgid "Groups"
msgstr "Группы"
#: source/ubl-strings.h:42
#: source/ubl-strings.h:43
msgid "Password input"
msgstr "Ввод пароля"
#: source/ubl-strings.h:43
#: source/ubl-strings.h:44
msgid "File owerview"
msgstr "Обзор файлов"
#: source/ubl-strings.h:45
#: source/ubl-strings.h:46
msgid "Inspect users and groups in system"
msgstr "Просмотр пользователей и групп в системе"
#: source/ubl-strings.h:46 source/ubl-strings.h:56
#: source/ubl-strings.h:47 source/ubl-strings.h:58
msgid "Additional settings"
msgstr "Дополнительные настройки"
#: source/ubl-strings.h:47
#: source/ubl-strings.h:48
msgid "Shared groups configuration"
msgstr "Группы пользователей по умолчанию"
#: source/ubl-strings.h:48
#: source/ubl-strings.h:49
msgid "Create new"
msgstr "Создать"
#: source/ubl-strings.h:49
#: source/ubl-strings.h:50
msgid "Edit"
msgstr "Редактировать"
#: source/ubl-strings.h:50
#: source/ubl-strings.h:51
msgid "Remove"
msgstr "Удалить"
#: source/ubl-strings.h:51
#: source/ubl-strings.h:52
msgid "Update users and groups"
msgstr "Обновить список пользователей и групп"
@ -271,95 +275,111 @@ msgstr "Вы уверены, что хотите удалить группу"
msgid "Are you sure want to delete user"
msgstr "Вы уверены, что хотите удалить пользователя"
#: source/ubl-strings.h:57
#: source/ubl-strings.h:53
msgid "Additional saving configuration"
msgstr "Дополнительные настройки сохранения"
#: source/ubl-strings.h:59
msgid "No password required"
msgstr "Пароль не требуется"
#: source/ubl-strings.h:58
#: source/ubl-strings.h:60
msgid "Set a password"
msgstr "Задать пароль"
#: source/ubl-strings.h:59
#: source/ubl-strings.h:61
msgid "Endrypted password"
msgstr "Зашифрованный пароль"
#: source/ubl-strings.h:72
#: source/ubl-strings.h:74
msgid "Accept"
msgstr "Принять"
#: source/ubl-strings.h:75
#: source/ubl-strings.h:77
msgid "Configure group"
msgstr "Редактировать группу"
#: source/ubl-strings.h:76
#: source/ubl-strings.h:78
msgid "Add group"
msgstr "Добавить группу"
#: source/ubl-strings.h:77
#: source/ubl-strings.h:79
msgid "Group id:"
msgstr "ID Группы:"
#: source/ubl-strings.h:78
#: source/ubl-strings.h:80
msgid "Group name:"
msgstr "Имя группы:"
#: source/ubl-strings.h:79
#: source/ubl-strings.h:81
msgid "Group users:"
msgstr "Пользователи группы:"
#: source/ubl-strings.h:80
#: source/ubl-strings.h:82
msgid "Automatically"
msgstr "Автоматически"
#: source/ubl-strings.h:82
#: source/ubl-strings.h:84
msgid "Create group with ununique GID"
msgstr "Создать группу с повторяющимися (не уникальными) GID"
#: source/ubl-strings.h:83
#: source/ubl-strings.h:85
msgid "Create system group"
msgstr "Создать системную группу"
#: source/ubl-strings.h:84
#: source/ubl-strings.h:86
msgid "Encrypted password"
msgstr "Зашифрованный пароль"
#: source/ubl-strings.h:85
#: source/ubl-strings.h:87
msgid "Additional configuration"
msgstr "Дополнительные настройки"
#: source/ubl-strings.h:88
msgid "Group configuration synchronization"
msgstr "Синхронизация настроек группы"
#: source/ubl-strings.h:89
msgid "When shutting down the system, save the group into the configuration"
msgstr "При завершении работы системы сохранить группу в конфигурацию"
#: source/ubl-strings.h:90
msgid "Group administrators:"
msgstr "Администраторы группы:"
#: source/ubl-strings.h:93
msgid "Default groups"
msgstr "Группы пользователей по умолчанию"
#: source/ubl-strings.h:89
#: source/ubl-strings.h:94
msgid "Main group"
msgstr "Основная группа"
#: source/ubl-strings.h:90
#: source/ubl-strings.h:95
msgid "Additional groups"
msgstr "Дополнительные группы"
#: source/ubl-strings.h:91
#: source/ubl-strings.h:96
msgid "Choose groups"
msgstr "Выбрать группы"
#: source/ubl-strings.h:92
#: source/ubl-strings.h:97
msgid "Choose users"
msgstr "Выбрать пользователей"
#: source/ubl-strings.h:95
#: source/ubl-strings.h:100
msgid "System users and groups"
msgstr "Пользователи и группы в системе"
#: source/ubl-strings.h:96
#: source/ubl-strings.h:101
msgid "Blocked"
msgstr "Заблокировано"
#: source/ubl-strings.h:97
#: source/ubl-strings.h:102
msgid "Username"
msgstr "Имя пользователя"
#: source/ubl-strings.h:98
#: source/ubl-strings.h:103
msgid ""
"Primary\n"
"group"
@ -367,7 +387,7 @@ msgstr ""
"Основная\n"
"группа"
#: source/ubl-strings.h:99
#: source/ubl-strings.h:104
msgid ""
"Home\n"
"directory"
@ -375,31 +395,31 @@ msgstr ""
"Домашний\n"
"каталог"
#: source/ubl-strings.h:100 source/ubl-strings.h:106
#: source/ubl-strings.h:105 source/ubl-strings.h:111
msgid "Group"
msgstr "Группа"
#: source/ubl-strings.h:101
#: source/ubl-strings.h:106
msgid "Update the system users and groups list"
msgstr "Обновить список пользователей и групп системы"
#: source/ubl-strings.h:102
#: source/ubl-strings.h:107
msgid "Toggle system groups and users"
msgstr "Переключить видимость системных пользователей и групп"
#: source/ubl-strings.h:104
#: source/ubl-strings.h:109
msgid "Password mismatch"
msgstr "Несовпадение паролей"
#: source/ubl-strings.h:105
#: source/ubl-strings.h:110
msgid "Password must be at least"
msgstr "Пароль должен состоять из как минимум"
#: source/ubl-strings.h:105
#: source/ubl-strings.h:110
msgid "characters"
msgstr "символов"
#: source/ubl-strings.h:107
#: source/ubl-strings.h:112
msgid ""
"Days until\n"
"warning"
@ -407,7 +427,7 @@ msgstr ""
"Дней до\n"
"предупреждения"
#: source/ubl-strings.h:108
#: source/ubl-strings.h:113
msgid ""
"Days\n"
"without activity"
@ -415,7 +435,7 @@ msgstr ""
"Дней без\n"
"активности"
#: source/ubl-strings.h:109
#: source/ubl-strings.h:114
msgid ""
"Shell\n"
"path"
@ -423,7 +443,7 @@ msgstr ""
"Путь до\n"
"оболочки"
#: source/ubl-strings.h:110
#: source/ubl-strings.h:115
msgid ""
"Password has\n"
"been changed"
@ -431,7 +451,7 @@ msgstr ""
"Пароль\n"
"изменён"
#: source/ubl-strings.h:111
#: source/ubl-strings.h:116
msgid ""
"Expiration\n"
"date"
@ -439,7 +459,7 @@ msgstr ""
"Дата\n"
"устаревания"
#: source/ubl-strings.h:112
#: source/ubl-strings.h:117
msgid ""
"Password change\n"
"interval (min)"
@ -447,7 +467,7 @@ msgstr ""
"Интервал смены\n"
"пароля (мин.)"
#: source/ubl-strings.h:113
#: source/ubl-strings.h:118
msgid ""
"Password change\n"
"interval (max)"
@ -455,162 +475,218 @@ msgstr ""
"Интервал смены\n"
"пароля (макс.)"
#: source/ubl-strings.h:116
#: source/ubl-strings.h:121
msgid "Add user"
msgstr "Добавить пользователя"
#: source/ubl-strings.h:117
#: source/ubl-strings.h:122
msgid "Configure user"
msgstr "Редактировать пользователя"
#: source/ubl-strings.h:118
#: source/ubl-strings.h:123
msgid "Set"
msgstr "Задать"
#: source/ubl-strings.h:119
#: source/ubl-strings.h:124
msgid "Empty important field"
msgstr "Пустое важное поле"
#: source/ubl-strings.h:120
#: source/ubl-strings.h:125
msgid "Loading has failed"
msgstr "Ошибка загрузки"
#: source/ubl-strings.h:121
#: source/ubl-strings.h:126
msgid "Login name"
msgstr "Имя логина"
#: source/ubl-strings.h:122
#: source/ubl-strings.h:127
msgid "Additional groups:"
msgstr "Дополнительные группы:"
#: source/ubl-strings.h:123
#: source/ubl-strings.h:128
msgid "Password configuration"
msgstr "Конфигурация пароля"
#: source/ubl-strings.h:124
#: source/ubl-strings.h:129
msgid "Password has been changed:"
msgstr "Пароль изменён:"
#: source/ubl-strings.h:125
#: source/ubl-strings.h:130
msgid "expiration date:"
msgstr "Дата устаревания:"
#: source/ubl-strings.h:126
#: source/ubl-strings.h:131
msgid "Password change interval: minimum"
msgstr "Интервал смены пароля: минимум"
#: source/ubl-strings.h:127
#: source/ubl-strings.h:132
msgid "days, maximum"
msgstr "дней, максимум"
#: source/ubl-strings.h:128
#: source/ubl-strings.h:133
msgid "days"
msgstr "дней"
#: source/ubl-strings.h:129
#: source/ubl-strings.h:134
msgid "Days until warning:"
msgstr "Дней до предупреждения:"
#: source/ubl-strings.h:130
#: source/ubl-strings.h:135
msgid "Days without activity:"
msgstr "Дней без активности:"
#: source/ubl-strings.h:131
#: source/ubl-strings.h:136
msgid "Force change at next login"
msgstr "Принудительно сменить при следующем входе в систему"
#: source/ubl-strings.h:132
#: source/ubl-strings.h:137
msgid "User shell:"
msgstr "Оболочка пользователя:"
#: source/ubl-strings.h:133
#: source/ubl-strings.h:138
msgid "Home directory:"
msgstr "Домашний каталог:"
#: source/ubl-strings.h:134
#: source/ubl-strings.h:139
msgid "Don't set"
msgstr "Не создавать"
#: source/ubl-strings.h:135
#: source/ubl-strings.h:140
msgid "Create system user"
msgstr "Создать системного пользователя"
#: source/ubl-strings.h:136
#: source/ubl-strings.h:141
msgid "Create user with ununique (repeating) UID"
msgstr "Создать пользователя с повторяющимися (не уникальными) UID"
#: source/ubl-strings.h:137
#: source/ubl-strings.h:142
msgid "Do not check login for compliance with character rules"
msgstr "Не проверять логин на несоответствие правилам использования символов"
#: source/ubl-strings.h:138
#: source/ubl-strings.h:143
msgid "Temporary deactivation"
msgstr "Временное отключение учётной записи"
#: source/ubl-strings.h:139
#: source/ubl-strings.h:144
msgid "Save"
msgstr "Сохранить"
#: source/ubl-strings.h:140
#: source/ubl-strings.h:145
msgid "login_name"
msgstr "Имя_логина"
#: source/ubl-strings.h:141
#: source/ubl-strings.h:146
msgid "group_name"
msgstr "Имя_группы"
#: source/ubl-strings.h:142
#: source/ubl-strings.h:147
msgid "User name"
msgstr "Имя пользователя"
#: source/ubl-strings.h:144
#: source/ubl-strings.h:148
msgid "Sync user"
msgstr "Синхронизировать пользователя"
#: source/ubl-strings.h:149
msgid "Sync user with password"
msgstr "Синхронизировать пользователя с паролем"
#: source/ubl-strings.h:150
msgid "Encrypt all passwords"
msgstr "Зашифровать все пароли"
#: source/ubl-strings.h:152
msgid "User configuration"
msgstr "Настройка пользователя"
#: source/ubl-strings.h:145
#: source/ubl-strings.h:153
msgid "User configuration synchronization"
msgstr "Синхронизация настроек пользователя"
#: source/ubl-strings.h:146
#: source/ubl-strings.h:154
msgid "During system startup, load the user from the configuration"
msgstr "При загрузке системы загрузить пользователя из конфигурации"
#: source/ubl-strings.h:147
#: source/ubl-strings.h:155
msgid "When shutting down the system, save the user into the configuration"
msgstr "При завершении работы системы сохранить пользователя в конфигурацию"
#: source/ubl-strings.h:148
#: source/ubl-strings.h:156
msgid "User password configuration syncronization"
msgstr "Синхронизация настроек пароля пользователя"
#: source/ubl-strings.h:149
#: source/ubl-strings.h:157
msgid ""
"During system startup, load the user's parameters from the configuration"
msgstr "При загрузке системы загрузить параметры пользователя из конфигурации"
#: source/ubl-strings.h:150
#: source/ubl-strings.h:158
msgid ""
"When shutting down the system, save the user's parameters into the "
"configuration"
msgstr ""
"При завершении работы системы сохранить параметры пользователя в конфигурацию"
#: source/ubl-strings.h:152
#: source/ubl-strings.h:160
msgid "Main"
msgstr "Основные"
#: source/ubl-strings.h:153
#: source/ubl-strings.h:161
msgid "Additional"
msgstr "Дополнительные"
#: source/ubl-strings.h:154
#: source/ubl-strings.h:162
msgid "Syncronization"
msgstr "Синхронизация"
#: source/ubl-strings.h:157
#: source/ubl-strings.h:165
msgid "Repeat password:"
msgstr "Подтверждение пароля:"
#: source/ubl-strings.h:158
#: source/ubl-strings.h:166
msgid "Password hash:"
msgstr "Хэш пароля:"
#: source/ubl-strings.h:167
msgid "Do not encrypt password"
msgstr "Не шифровать пароль"
#: source/ubl-strings.h:170
msgid "Additional configuration of service parameter saving"
msgstr "Дополнительные настройки сохранения параметров сервисов"
#: source/ubl-strings.h:171
msgid ""
"At every system shutdown save changes of (root)/var/lib/samba\n"
"into (hd)/ublinux-data/rootcopy"
msgstr ""
"При каждом завершении работы ОС сохранять изменения (root)/var/lib/samba\n"
"в (hd)/ublinux-data/rootcopy/"
#: source/ubl-strings.h:172
msgid "For system save mode \"Sandbox\""
msgstr "Для режима сохранения системы \"Песочница\""
#: source/ubl-strings.h:175
msgid "User deletion"
msgstr "Удаление пользователя(-лей)"
#: source/ubl-strings.h:176
msgid "Confirm user(-s) deletion:"
msgstr "Подтвердите удаление пользователя (-ей):"
#: source/ubl-strings.h:177
msgid "Chosen"
msgstr "Выбран"
#: source/ubl-strings.h:178
msgid "User"
msgstr "Пользователь"
#: source/ubl-strings.h:179
msgid "Home directory"
msgstr "Домашний каталог"
#: source/ubl-strings.h:180
msgid "Delete home directory"
msgstr "Удалить домашний каталог"

Loading…
Cancel
Save