{"id":6337,"date":"2022-12-20T18:58:11","date_gmt":"2022-12-20T21:58:11","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/userdel-pl\/"},"modified":"2022-12-20T18:58:11","modified_gmt":"2022-12-20T21:58:11","slug":"userdel-pl","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/userdel-pl\/","title":{"rendered":"USERDEL (pl)"},"content":{"rendered":"<h1 align=\"center\">USERDEL<\/h1>\n<p> <a href=\"#NAZWA\">NAZWA<\/a><br \/> <a href=\"#STRESZCZENIE\">STRESZCZENIE<\/a><br \/> <a href=\"#OPIS\">OPIS<\/a><br \/> <a href=\"#OPCJE\">OPCJE<\/a><br \/> <a href=\"#CONFIGURATION\">CONFIGURATION<\/a><br \/> <a href=\"#PLIKI\">PLIKI<\/a><br \/> <a href=\"#KOD ZAKO\u00c5CZENIA\">KOD ZAKO\u00c5CZENIA<\/a><br \/> <a href=\"#OSTRZE\u00c5\u00bbENIA\">OSTRZE\u00c5\u00bbENIA<\/a><br \/> <a href=\"#ZOBACZ TAK\u00c5\u00bbE\">ZOBACZ TAK\u00c5\u00bbE<\/a> <\/p>\n<hr>\n<h2>NAZWA <a name=\"NAZWA\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">userdel \u2212 plik chroniony informacji o u\u00c5\u00bcytkownikach<\/p>\n<h2>STRESZCZENIE <a name=\"STRESZCZENIE\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"11%\"><\/td>\n<td width=\"32%\">\n<p style=\"margin-top: 1em\"><b>userdel<\/b> [opcje] <i>LOGIN<\/i><\/p>\n<\/td>\n<td width=\"57%\"> <\/td>\n<\/tr>\n<\/table>\n<h2>OPIS <a name=\"OPIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>userdel<\/b> command modifies the system account files, deleting all entries that refer to the user name <i>LOGIN<\/i>. The named user must exist.<\/p>\n<h2>OPCJE <a name=\"OPCJE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Polecenie <b>userdel<\/b> posiada nast\u00c4puj\u00c4ce opcje:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212f<\/b>, <b>\u2212\u2212force<\/b><\/p>\n<p style=\"margin-left:17%;\">This option forces the removal of the user account, even if the user is still logged in. It also forces <b>userdel<\/b> to remove the user&#8217;s home directory and mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user. If <b>USERGROUPS_ENAB<\/b> is defined to <i>yes<\/i> in \/etc\/login.defs and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primary group of another user.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><i>Note:<\/i> This option is dangerous and may leave your system in an inconsistent state.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212h<\/b>, <b>\u2212\u2212help<\/b><\/p>\n<p style=\"margin-left:17%;\">Wy\u00c5wietlenie komunikatu pomocy i zako\u00c5czenie dzia\u0142ania.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212r<\/b>, <b>\u2212\u2212remove<\/b><\/p>\n<p style=\"margin-left:17%;\">Files in the user&#8217;s home directory will be removed along with the home directory itself and the user&#8217;s mail spool. Files located in other file systems will have to be searched for and deleted manually.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The mail spool is defined by the <b>MAIL_DIR<\/b> variable in the login.defs file.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212R<\/b>, <b>\u2212\u2212root\u00a0<\/b><i>CHROOT_DIR<\/i><\/p>\n<p style=\"margin-left:17%;\">Apply changes in the <i>CHROOT_DIR<\/i> directory and use the configuration files from the <i>CHROOT_DIR<\/i> directory.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212P<\/b>, <b>\u2212\u2212prefix\u00a0<\/b><i>PREFIX_DIR<\/i><\/p>\n<p style=\"margin-left:17%;\">Apply changes in the <i>PREFIX_DIR<\/i> directory and use the configuration files from the <i>PREFIX_DIR<\/i> directory. This option does not chroot and is intended for preparing a cross\u2212compilation target. Some limitations: NIS and LDAP users\/groups are not verified. PAM authentication is using the host files. No SELINUX support.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>\u2212Z<\/b>, <b>\u2212\u2212selinux\u2212user<\/b><\/p>\n<p style=\"margin-left:17%;\">Remove any SELinux user mapping for the user&#8217;s login.<\/p>\n<h2>CONFIGURATION <a name=\"CONFIGURATION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The following configuration variables in \/etc\/login.defs change the behavior of this tool:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>MAIL_DIR<\/b> (string)<\/p>\n<p style=\"margin-left:17%;\">The mail spool directory. This is needed to manipulate the mailbox when its corresponding user account is modified or deleted. If not specified, a compile\u2212time default is used.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>MAIL_FILE<\/b> (string)<\/p>\n<p style=\"margin-left:17%;\">Defines the location of the users mail spool files relatively to their home directory.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The <b>MAIL_DIR<\/b> and <b>MAIL_FILE<\/b> variables are used by <b>useradd<\/b>, <b>usermod<\/b>, and <b>userdel<\/b> to create, move, or delete the user&#8217;s mail spool.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <b>MAIL_CHECK_ENAB<\/b> is set to <i>yes<\/i>, they are also used to define the <b>MAIL<\/b> environment variable.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>MAX_MEMBERS_PER_GROUP<\/b> (number)<\/p>\n<p style=\"margin-left:17%;\">Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in \/etc\/group (with the same name, same password, and same GID).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The default value is 0, meaning that there are no limits in the number of members in a group.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">This feature (split group) permits to limit the length of lines in the group file. This is useful to make sure that lines for NIS groups are not larger than 1024 characters.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">If you need to enforce such limit, you can use 25.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Note: split groups may not be supported by all tools (even in the Shadow toolsuite). You should not use this variable unless you really need it.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>USERDEL_CMD<\/b> (string)<\/p>\n<p style=\"margin-left:17%;\">If defined, this command is run when removing a user. It should remove any at\/cron\/print jobs etc. owned by the user to be removed (passed as the first argument).<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">The return code of the script is not taken into account.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">Here is an example script, which removes the user&#8217;s cron, at and print jobs:<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\">#! \/bin\/sh<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"># Check for the required argument. <br \/> if [ $# != 1 ]; then<\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>echo &#8220;Usage: $0 username&#8221;<\/p>\n<\/td>\n<\/tr>\n<tr valign=\"top\" align=\"left\">\n<td width=\"8%\"><\/td>\n<td width=\"92%\">\n<p>exit 1<\/p>\n<\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:23%;\">fi<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"># Remove cron jobs. <br \/> crontab \u2212r \u2212u $1<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"># Remove at jobs. <br \/> # Note that it will remove any jobs owned by the same UID, <br \/> # even if it was shared by a different username. <br \/> AT_SPOOL_DIR=\/var\/spool\/cron\/atjobs <br \/> find $AT_SPOOL_DIR \u2212name &#8220;[^.]*&#8221; \u2212type f \u2212user $1 \u2212delete ;<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"># Remove print jobs. <br \/> lprm $1<\/p>\n<p style=\"margin-left:23%; margin-top: 1em\"># All done. <br \/> exit 0<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>USERGROUPS_ENAB<\/b> (boolean)<\/p>\n<p style=\"margin-left:17%;\">Enable setting of the umask group bits to be the same as owner bits (examples: 022 \u2212> 002, 077 \u2212> 007) for non\u2212root users, if the uid is the same as gid, and username is the same as the primary group name.<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">If set to <i>yes<\/i>, <b>userdel<\/b> will remove the user&#8217;s group if it contains no more members, and <b>useradd<\/b> will create by default a group with the name of the user.<\/p>\n<h2>PLIKI <a name=\"PLIKI\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/group<\/p>\n<p style=\"margin-left:17%;\">Informacje o grupach u\u00c5\u00bcytkownik\u00f3w.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/login.defs<\/p>\n<p style=\"margin-left:17%;\">Konfiguracja pakietu shadow.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/passwd<\/p>\n<p style=\"margin-left:17%;\">Informacja o kontach u\u00c5\u00bcytkownik\u00f3w.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/shadow<\/p>\n<p style=\"margin-left:17%;\">Informacje chronione o u\u00c5\u00bcytkownikach.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/subgid<\/p>\n<p style=\"margin-left:17%;\">Per user subordinate group IDs.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">\/etc\/subuid<\/p>\n<p style=\"margin-left:17%;\">Per user subordinate user IDs.<\/p>\n<h2>KOD ZAKO\u00c5CZENIA <a name=\"KOD ZAKO\u00c5CZENIA\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Polecenie <b>userdel<\/b> ko\u00c5czy dzia\u0142anie z nast\u00c4puj\u00c4cymi warto\u00c5ciami kod\u00f3w zako\u00c5czenia:<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>0<\/i><\/p>\n<p style=\"margin-left:17%;\">poprawne zako\u00c5czenie dzia\u0142ania programu<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>1<\/i><\/p>\n<p style=\"margin-left:17%;\">nie mo\u00c5\u00bcna zaktualizowa\u00c4 pliku z has\u0142ami<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>2<\/i><\/p>\n<p style=\"margin-left:17%;\">niepoprawna sk\u0142adnia polecenia<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>6<\/i><\/p>\n<p style=\"margin-left:17%;\">specified user doesn&#8217;t exist<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>8<\/i><\/p>\n<p style=\"margin-left:17%;\">user currently logged in<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>10<\/i><\/p>\n<p style=\"margin-left:17%;\">nie mo\u00c5\u00bcna zaktualizowa\u00c4 pliku z grupami<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>12<\/i><\/p>\n<p style=\"margin-left:17%;\">can&#8217;t remove home directory<\/p>\n<h2>OSTRZE\u00c5\u00bbENIA <a name=\"OSTRZE\u00c5\u00bbENIA\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>userdel<\/b> will not allow you to remove an account if there are running processes which belong to this account. In that case, you may have to kill those processes or lock the user&#8217;s password or account and remove the account later. The <b>\u2212f<\/b> option can force the deletion of this account.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You should manually check all file systems to ensure that no files remain owned by this user.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">You may not remove any NIS attributes on a NIS client. This must be performed on the NIS server.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If <b>USERGROUPS_ENAB<\/b> is defined to <i>yes<\/i> in \/etc\/login.defs, <b>userdel<\/b> will delete the group with the same name as the user. To avoid inconsistencies in the passwd and group databases, <b>userdel<\/b> will check that this group is not used as a primary group for another user, and will just warn without deleting the group otherwise. The <b>\u2212f<\/b> option can force the deletion of this group.<\/p>\n<h2>ZOBACZ TAK\u00c5\u00bbE <a name=\"ZOBACZ TAK\u00c5\u00bbE\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>chfn<\/b>(1), <b>chsh<\/b>(1), <b>passwd<\/b>(1), <b>login.defs<\/b>(5), <b>gpasswd<\/b>(8), <b>groupadd<\/b>(8), <b>groupdel<\/b>(8), <b>groupmod<\/b>(8), <b>subgid<\/b>(5), <b>subuid<\/b>(5), <b>useradd<\/b>(8), <b>usermod<\/b>(8).<\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>USERDEL NAZWA STRESZCZENIE OPIS OPCJE CONFIGURATION PLIKI KOD ZAKO\u00c5CZENIA OSTRZE\u00c5\u00bbENIA ZOBACZ TAK\u00c5\u00bbE NAZWA userdel \u2212 plik chroniony informacji o u\u00c5\u00bcytkownikach STRESZCZENIE userdel [opcje] LOGIN OPIS The userdel command modifies the system account files, deleting all entries that refer to the user name LOGIN. The named user must exist. OPCJE Polecenie userdel posiada nast\u00c4puj\u00c4ce opcje: \u2212f, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,2930,254],"class_list":["post-6337","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-pl","tag-userdel"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=6337"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/6337\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=6337"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=6337"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=6337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}