Password never expires

Содержание

Password never expires

Когда истекает пароль пользователя в AD, оповещаем пользователей о необходимости сменить пароль

В этой статье мы покажем, как с помощью PowerShell узнать, когда истекает пароль учетной записи пользователя в Active Directory, установить бессрочный пароль для учетной записи (PasswordNeverExpires = True) и заблаговременно оповестить пользователей о необходимости сменить пароль.

Если срок действия пароля пользователя в домене истек, учетная запись не блокируется, но не может использоваться для доступа к доменным ресурсам до тех пор, пока пользователь не сменит свой истекший пароль на новый. Чаще всего проблемы с истекшими паролями возникает у удаленных пользователей, которые не могут сменить свой пароль стандартными средствами.

Текущие настройки политики срока действия паролей в домене можно получить с помощью команды PowerShell

В нашем примере максимальный срок действия пароля пользователя в домене – 60 дней.

Как узнать срок действия пароля пользователя в Active Directory?

Можно узнать срок действия пароля и дату его последней смены из командной строки с помощь команды Net user:

net user aaivanov /domain

Необходимые данные присутствуют в значениях:

  • Password last set — 1/21/2020 11:18:37 AM
  • Password expires — 3/21/2020 11:18:37 AM
  • Password changeable — 1/22/2020 11:18:37 AM

Для получения параметров учетных записей в AD мы будем использовать специальный модуль PowerShell для Active Directory, который позволяет получить значения различных атрибутов объектов AD (см. как установить и импортировать модуль AD PowerShell в Windows 10 и Windows Server 2012 R2/2016).

С помощью командлета Get-AdUser можно получить время последней смены пароля пользователя и проверить, установлена ли опция бессрочного пароля (PasswordNeverExpires):

get-aduser aaivanov -properties PasswordLastSet, PasswordNeverExpires, PasswordExpired |ft Name, PasswordLastSet, PasswordNeverExpires,PasswordExpired

  • PasswordLastSet — время последней смены пароля пользователя;
  • PasswordNeverExpires – возвращает значение True, если пароль пользователя никогда не устаревает;
  • PasswordExpired – если пароль пользователя устарел — возвращает True, если пароль не устарел – False;

Но как вы видите, в оснастке указана только время смены пароля. Когда истекает срок действия пароля — непонятно.

Чтобы получить не время последней смены пароля, а дату окончания его срока действия, нужно использовать специальный constructed-атрибут msDS-UserPasswordExpiryTimeComputed. Значение атрибута msDS-UserPasswordExpiryTimeComputed автоматически вычисляется на основании времени последней смены пароля и парольной политики домена

Параметр UserPasswordExpiryTimeComputed возвращает время в формате TimeStamp и для преобразования его в человеко-понятный вид я использую функцию FromFileTime:

Таким образом мы получили время истечения срока действия пароля пользователя.

Чтобы получить срок действия паролей для всех пользователей их определенного контейнера (OU) AD, можно воспользоваться таким скриптом PowerShell:

$Users = Get-ADUser -SearchBase ‘OU=Users,OU=SPB,DC=corp,DC=winitpro,DC=ru’ -filter -Properties msDS-UserPasswordExpiryTimeComputed, PasswordLastSet, CannotChangePassword
$Users | select Name, @>, PasswordLastSet

В результате появилась табличка со списком активных пользователей, сроком действия и временем последней смены пароля.

Можно вывести только список пользователей, чей пароль уже истек:

$Users = Get-ADUser -SearchBase ‘OU=Users,OU=SPB,DC=corp,DC=winitpro,DC=ru’ -filter -Properties msDS-UserPasswordExpiryTimeComputed, PasswordLastSet, CannotChangePassword
foreach($user in $Users)<
if( [datetime]::FromFileTime($user.»msDS-UserPasswordExpiryTimeComputed») -lt (Get-Date)) <
$user.Name
>
>

Отключить срок действия пароля для учетной записи

Если вам нужно сделать срок действия пароля определенной учетной записи неограниченным, нужно включить опцию Password Never Expires в свойствах пользователя в AD (это одно из битовых значений атрибута UserAccountControl).

Либо вы можете включить эту опцию через PowerShell:

Get-ADUser aaivanov | Set-ADUser -PasswordNeverExpires:$True

Можно установить флаг Password Never Expires сразу для нескольких пользователей, список которых содержится в текстовом файле:

$users=Get-Content «C:PSusers_never_expire.txt»
Foreach ($user in $users) <
Set-ADUser $user -PasswordNeverExpires:$True
>

Можно вывести список всех пользователей, для которых отключено требование регулярной смены пароля:

Get-ADUser -filter * -properties Name, PasswordNeverExpires | where <$_.passwordNeverExpires -eq "true" >| Select-Object DistinguishedName,Name,Enabled |ft

Политика оповещения об окончании срока действия пароля

В Windows есть отдельный параметр групповой политики, позволяющий оповещать пользователей о необходимости сменить пароль.

Политика называется Interactive logon: Prompt user to change password before expiration и находится в разделе GPO Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Local Policies -> Security Options.

По умолчанию эту политика включена на уровне локальных настроек Windows и уведомления начинают появляться за 5 дней до истечения срока действия пароля. Вы можете изменить количество дней, в течении которых должно появляться уведомление о смене пароля.

После включения этой политики, если пароль пользователя истекает, то при входе в систему в трее будет появляться уведомление о необходимости сменить пароль.

Также вы можете использовать простой PowerShel скрипт, который автоматически вызывает диалоговое окно со предложением сменить пароль, если он истекает менее чем через 5 дней:

$curruser= Get-ADUser -Identity $env:username -Properties ‘msDS-UserPasswordExpiryTimeComputed’,’PasswordNeverExpires’
if ( -not $curruser.’PasswordNeverExpires’) <
$timediff=(new-timespan -start (get-date) -end ([datetime]::FromFileTime($curruser.»msDS-UserPasswordExpiryTimeComputed»))).Days
if ($timediff -lt 5) <
$msgBoxInput = [System.Windows.MessageBox]::Show(«Ваш пароль истекает через «+ $timediff + » дней!`nХотите сменить пароль сейчас?»,»Внимание!»,»YesNo»,»Warning»)
switch ($msgBoxInput) <
‘Yes’ <
cmd /c «explorer shell. <2559a1f2-21d7-11d4-bdaf-00c04f60b9f0>«
>
‘No’ < >
>
>
>

Читать еще:  Битый файл word

Если пользователь нажимает ДА, появляется диалоговое окно Windows Security, которое вы видите при нажатии Ctrl+Alt+Del или Ctrl+Alt+End (при RDP подключении).

Данный скрипт нужно поместить в автозагрузку или запускать как logon скрипт групповых политик.

PowerShell скрипт для email-уведомления об истечении срока действия пароля

Если вы хотите индивидуально рассылать пользователям письма о том, что срок действия их паролей скоро истечет, можно использовать такой PowerShell скрипт.

$Sender = «info@winitpro.ru»
$Subject = ‘Внимание! Скоро истекает срок действия Вашего пароля!’
$BodyTxt1 = ‘Срок действия Вашего пароля для’
$BodyTxt2 = ‘заканчивается через ‘
$BodyTxt3 = ‘дней. Не забудьте заранее сменить Ваш пароль. Если у вас есть вопросы, обратитесь в службу HelpDesk.’
$smtpserver =»smtp.domain.com»
$warnDays = (get-date).adddays(7)
$2Day = get-date
$Users = Get-ADUser -SearchBase ‘OU=Users,DC=corp,DC=winitpro,DC=ru’ -filter -Properties msDS-UserPasswordExpiryTimeComputed, EmailAddress, Name | select Name, @>, EmailAddress
foreach ($user in $users) <
if (($user.ExpirationDate -lt $warnDays) -and ($2Day -lt $user.ExpirationDate) ) <
$lastdays = ( $user.ExpirationDate -$2Day).days
$EmailBody = $BodyTxt1, $user.name, $BodyTxt2, $lastdays, $BodyTxt3 -join ‘ ‘
Send-MailMessage -To $user.EmailAddress -From $Sender -SmtpServer $smtpserver -Subject $Subject -Body $EmailBody
>
>

Скрипт проверяет всех активных пользователей домена с истекающими паролями. За 7 дней до истечения пароля пользователю начинают отправляться письма на email адрес, указанный в AD. Письма отправляются до тех пор, пока пароль не будет изменен или просрочен.

Данный PowerShell скрипт нужно запускать регулярно на любом компьютере/сервере домена (проще всего через Task Scheduler). Естественно, нужно на вашем SMTP сервере добавить IP адрес хоста, с которого рассылаются письма, в разрешенные отправители без аутентификации.

BleepingComputer.com

Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

cannot set password never expires (server.

hansb1 30 Jan 2015

I have a stand alone server 2012.

I login as local Administrator.

I see the popup message:your password is expired in 1 day,you must change your password.

I open local security policy in server manager

I go to the object account policies->password policy->max password age

The age is set to 42 and is greyed out.I want to set it to 0 but I cannot change the value.

How can i change it to 0?

hansb1 30 Jan 2015

I’ve also tried gpedit.msc and tried to change the max password but all the security settings in computer configuration are greyed out and cannot be changed.

sflatechguy 01 Feb 2015

Go into Active Directory Users and Computers, find the user account you want to set to password never expires, open the Account tab, and under account options, select Password never expires.

Or, open the PowerShell for Active Directory module, and enter Set-ADUser -UserPrincipalName -PasswordNeverExpires $true

hansb1 01 Feb 2015

As I said it’s a stand alone server and no domain controller.

I can log in a domain but I have no Active Directory Users and Computers in tools of server manager and if I had that I would not find there the local administrator account of the stand alone server.

In active directory is the domain administrator(of a external domain controller) I think.

sflatechguy 01 Feb 2015

If your options in the local security policy snap-in are greyed out, they have been or or being overriden by domain group policies.

Was this server ever joined to a domain at some point?

If not, check to see if User Account Control is disabled, and enable it.

hansb1 02 Feb 2015

This server is a virtual machine.I did not install it.I copied the image from someone.So I didn’t know if this server was ever joined to a domain.

I’ve checked user acount control and the registery value EnableLUA was set to 1 so its enabled.

In control panel the account control setting is set to notify

sflatechguy 02 Feb 2015

hansb1 03 Feb 2015

Do you mean on my server first the roll activ directory domain controller was added and then the role activ directory domain controller was removed and then I have copied the image?

sflatechguy 03 Feb 2015

jdros 29 May 2015

If the server IS a domain controller, you need to manage this through Active Directory Users & Computers .

Right click on Domain => Properties => Attribute Editor (last tab) => maxPwdAge

Default value is «42:00:00:00 «

sabrinau 02 Jul 2015

@hansb1, open a Command Prompt as the administrator mode, then run the following command:

3 Ways To Set Windows Local User Account Passwords To Never Expire

When you login to your Windows computer, you may get an error message like this:

Your password has expired and must be changed

In normal circumstances, it’s absolutely fine for Windows to remind you of password change after every specific no. of days but in some conditions, this practice should be disabled. A couple of scenarios could include the following:

  1. An administrator user should not have automatic expiration of password as this will lock you out of the computer if the password is not changed on regular basis.
  2. Another condition can be when you are accessing your computer remotely. If the password expires, you won’t be able to reset it remotely and will need physical access to the system.

In this tutorial, we will share three ways to set Windows local user account passwords to never expire. We will discuss about:

  1. How to set Windows local user account passwords to never expire for all users.
  2. How to set Windows local user account passwords to never expire for a specific user.
Читать еще:  Word длинный пробел

If you are using Windows 10 Home edition, you can enable Group Policy Editor for Windows 10 Home Edition.

Configure password expiration using User Management

Windows makes it easier for us to manage local users of the system.

Password never expire for a specific user

Just follow the steps below to set a specific user account passwords to never expire:

  1. Go to Run –> lusrmgr.msc. This opens user management console.
  2. Select Users from the left hand menu.
  3. Right-click the user which you want to configure and select Properties.

lusrmgr.msc local users and groups
In General tab, check the checkbox “Password never expires”. Or simply press Alt + P keyboard shortcut.

User Properties “Password never expires”

Password never expire for all users

If you want that the password for all users in your system should never expire, follow the instructions below:

  1. Go to Run –> gpedit.msc
  2. Navigate to the following tree:
    Computer configuration –> Windows Settings –> Security Settings –> Account Policies –> Password Policy
  3. In the right-hand pane, select “Maximum password age” and set it to 0.

Password policy to disable password expiry policy

Setting the maximum password age to zero will disable the password expiration feature in Windows.

Configure password expiration using command-line

If you are comfortable with command-line or want to do this remotely, you can use Windows commands for enabling and disabling the above mentioned policies.

Password never expire for a specific user using command-line

Open command-prompt with administrative privileges and run the following command sequence:

  • Get the name of users currently active on the system using this command: net accounts
  • Run the following command:
    wmic useraccount where “Name=’itechticsuser’” set PasswordExpires=false
    Replace ‘itechticsuser’ with the name of user you want to configure.

using wmic command to change password settings of a specific user

Password never expire for all users using command-line

Open command-prompt with administrative privileges and run the following command:

  • net accounts /maxpwage:unlimited

Configure password expiration using PowerShell

You can achieve the same results using PowerShell

Password never expire for a specific user using PowerShell

  1. Press Windows Key + X + A keyboard shortcut sequence to open PowerShell with administrative privileges.
  2. Run the following command:
    Set-LocalUser -Name “itechticsuser” -PasswordNeverExpires 1
    Replace itechticsuser with your desired username.

Password never expire for a specific user using PowerShell

password never expires

1 Never Give a Sucker an Even Break

2 Not Wanted

3 Не давай болвану передышки

4 mpact de la pęche sur l’environnement

  1. воздействие рыболовства на окружающую среду

EN

environmental impact of fishing
Fishing may have various negative effects on the environment: effluent and waste from fish farms may damage wild fish, seals, and shellfish. Fish farmers use tiny quantities of highly toxic chemicals to kill lice: one overdose could be devastating. So-called by-catches, or the incidental taking of non-commercial species in drift nets, trawling operations and long line fishing is responsible for the death of large marine animals and one factor in the threatened extinction of some species. Some fishing techniques, like the drift nets, yield not only tons of fish but kill millions of birds, whales and seals and catch millions of fish not intended. Small net holes often capture juvenile fish who never have a chance to reproduce. Some forms of equipment destroy natural habitats, for example bottom trawling may destroy natural reefs. Other destructive techniques are illegal dynamite and cyanide fishing. (Source: WPR)
[http://www.eionet.europa.eu/gemet/alphabetic?langcode=en]

Тематики

5 conducteur de phase

  1. фазный проводник

фазный проводник
L

Линейный проводник, используемый в электрической цепи переменного тока.
[ ГОСТ Р 50571. 1-2009 ( МЭК 60364-1: 2005)]

фазный проводник
L

Линейный проводник, используемый в электрической цепи переменного тока.
Термин «фазный проводник» признан недопустимым Международным электротехническим словарем (МЭС). Вместо него МЭС предписывает применять термин «линейный проводник». Однако рассматриваемый термин целесообразно использовать в национальной нормативной и правовой документации.
Фазный проводник представляет собой частный случай линейного проводника, применяемого в электрической цепи переменного тока. Фазные проводники совместно с нейтральными проводниками и PEN-проводниками используют в электроустановках зданий для обеспечения электроэнергией применяемого в них электрооборудования переменного тока.
[ http://www.volt-m.ru/glossary/letter/%D4/view/87/]

EN

line conductor
phase conductor (in AC systems) (deprecated)
pole conductor (in DC systems) (deprecated)

conductor which is energized in normal operation and capable of contributing to the transmission or distribution of electric energy but which is not a neutral or mid-point conductor
[IEV number 195-02-08]

FR

conducteur de ligne
conducteur de phase (déconseillé)

conducteur sous tension en service normal et capable de participer au transport ou à la distribution de l’énergie électrique, mais qui n’est ni un conducteur de neutre ni un conducteur de point milieu
[IEV number 195-02-08]

Параллельные тексты EN-RU

Ensure in the installation that the Neutral will never be disconnected before the supplying AC lines.
[Delta Energy Systems]

Электроустановка должна быть устроена таким образом, чтобы отключение нулевого рабочего проводника происходило только после того, как будут отключены фазные проводники.
[Перевод Интент]

If the phase currents are connected correctly.
[Schneider Electric]

Если фазные проводники подключены правильно.
[Перевод Интент]

Phases must at least be marked L1, L2, L3, at the end and at connection points.
[Schneider Electric]

Фазные проводники должны иметь маркировку L1, L2, L3 по крайней мере на концах и в точках присоединения.
[Перевод Интент]

6.6.28. В трех- или двухпроводных однофазных линиях сетей с заземленной нейтралью могут использоваться однополюсные выключатели, которые должны устанавливаться в цепи фазного провода, или двухполюсные, при этом должна исключаться возможность отключения одного нулевого рабочего проводника без отключения фазного.
[ПУЭ]

ОПН (или РВ) на ВЛИ должны быть присоединены к фазному проводу посредством прокалывающих зажимов
[Методические указания по защите распределительных электрических сетей]

2.4.19. На опорах допускается любое расположение фазных проводов независимо от района климатических условий. Нулевой провод, как правило, следует располагать ниже фазных проводов. Провода наружного освещения, прокладываемые на опорах совместно с проводами ВЛ, должны располагаться, как правило, над нулевым проводом.
[ПУЭ]

Password never expires перевод

password never expires

Перевод

пароль никогда не истекает

Перевод по словам
password — пароль, пропуск
never — никогда, ни разу, вовек, конечно, нет, не может быть
expire — истекать, терять силу, выдыхать, умирать, угасать, кончаться

Установка политики срока действия паролей в организации Set the password expiration policy for your organization

Настройка политики истечения срока действия паролей для отдельных пользователей Set the password expiration policy for individual users

Глобальный администратор облачной службы Майкрософт может использовать модуль Microsoft Azure AD для Windows PowerShell, чтобы задать срок действия паролей для определенных пользователей. A global admin for a Microsoft cloud service can use the Microsoft Azure AD Module for Windows PowerShell to set passwords not to expire for specific users. Кроме того, вы можете использовать командлеты Windows PowerShell, чтобы удалить конфигурацию, не ограниченную сроком действия, или просмотреть пароли пользователей, срок действия которых не ограничен. You can also use Windows PowerShell cmdlets to remove the never-expires configuration or to see which user passwords are set to never expire.

Это руководство относится к другим поставщикам, таким как Intune и Office 365, которые также основываются на Azure AD для удостоверений и служб каталогов. This guide applies to other providers, such as Intune and Office 365, which also rely on Azure AD for identity and directory services. Срок действия пароля является единственной частью политики, которую можно изменить. Password expiration is the only part of the policy that can be changed.

Срок действия только паролей для учетных записей пользователей, которые не синхронизируются с помощью синхронизации службы каталогов, может быть запрещен. Only passwords for user accounts that are not synchronized through directory synchronization can be configured to not expire. Дополнительные сведения о синхронизации службы каталогов можно найти в статье Connect AD with Azure AD. For more information about directory synchronization, see Connect AD with Azure AD.

Проверка политики истечения срока действия для пароля How to check the expiration policy for a password

Выполните одну из следующих команд: Run one of the following commands:

  • Чтобы убедиться, что срок действия пароля одного пользователя не ограничен, выполните следующий командлет с помощью имени участника-пользователя (например, *user@contoso.onmicrosoft.com*) или идентификатора пользователя, которого вы хотите проверить: To see if a single user’s password is set to never expire, run the following cmdlet by using the UPN (for example, *user@contoso.onmicrosoft.com*) or the user ID of the user you want to check:
  • Чтобы увидеть, что параметр Password не истечет срок действия для всех пользователей, выполните следующий командлет: To see the Password never expires setting for all users, run the following cmdlet:
  • Чтобы получить отчет обо всех пользователях с PasswordNeverExpires в HTML-коде на рабочем столе текущего пользователя с именем репортпассвордневерекспирес. HTML To get a report of all the users with PasswordNeverExpires in Html on the desktop of the current user with name ReportPasswordNeverExpires.html
  • Получение отчета обо всех пользователях с PasswordNeverExpires в CSV на рабочем столе текущего пользователя с именем репортпассвордневерекспирес. csv To get a report of all the users with PasswordNeverExpires in CSV on the desktop of the current user with name ReportPasswordNeverExpires.csv

Установка срока действия пароля Set a password to expire

Выполните одну из следующих команд: Run one of the following commands:

  • Чтобы задать пароль одного пользователя, чтобы срок действия пароля истек, выполните следующий командлет с помощью имени участника-пользователя или идентификатора пользователя: To set the password of one user so that the password expires, run the following cmdlet by using the UPN or the user ID of the user:
  • Чтобы задать пароли всех пользователей в Организации, истечения срока их действия, используйте следующий командлет: To set the passwords of all users in the organization so that they expire, use the following cmdlet:

Установка срока действия пароля не ограничена Set a password to never expire

Выполните одну из следующих команд: Run one of the following commands:

  • Чтобы задать срок действия пароля одного пользователя, выполните следующий командлет с помощью имени участника-пользователя или идентификатора пользователя: To set the password of one user to never expire, run the following cmdlet by using the UPN or the user ID of the user:
  • Чтобы запретить срок действия паролей для всех пользователей в Организации, выполните следующий командлет: To set the passwords of all the users in an organization to never expire, run the following cmdlet:

Для -PasswordPolicies DisablePasswordExpiration паролей устанавливается срок хранения, pwdLastSet основанный на атрибуте. Passwords set to -PasswordPolicies DisablePasswordExpiration still age based on the pwdLastSet attribute. Если вы настроили пароли пользователей, срок действия которых не истечет, а затем — срок действия паролей — 90 + дн. If you set the user passwords to never expire and then 90+ days go by, the passwords expire. В зависимости от pwdLastSet атрибута, если вы измените срок действия на -PasswordPolicies None , то все пароли, имеющие pwdLastSet старше 90 дней, должны изменить их при следующем входе в систему. Based on the pwdLastSet attribute, if you change the expiration to -PasswordPolicies None , all passwords that have a pwdLastSet older than 90 days require the user to change them the next time they sign in. Это изменение может повлиять на большое количество пользователей. This change can affect a large number of users.

Password — For other uses, see Password (disambiguation). A password is a secret word or string of characters that is used for authentication, to prove >Wikipedia

One-time password — A one time password (OTP) is a password that is val >Wikipedia

Zettai Karen Children — A ten year old Level 7 psychokinetic (the maximum esper potency designation), Kaoru is the reckless and zealous member of The Children Special Esper Team alongs >Wikipedia

Bubsy — is a series of v >Wikipedia

Читать еще:  Направление текста в ячейке word
IT Новости из мира ПК
Добавить комментарий