{"id":72252,"date":"2025-11-28T07:33:46","date_gmt":"2025-11-28T07:33:46","guid":{"rendered":"https:\/\/www.applivery.com\/?post_type=docs&#038;p=72252"},"modified":"2025-11-28T07:38:40","modified_gmt":"2025-11-28T07:38:40","password":"","slug":"how-to-change-a-user-password-in-macos","status":"publish","type":"docs","link":"https:\/\/www.applivery.com\/pt-br\/docs\/mobile-device-management\/apple-mdm\/macos\/how-to-change-a-user-password-in-macos\/","title":{"rendered":"How to change a user password in macOS"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"72252\" class=\"elementor elementor-72252\" data-elementor-post-type=\"docs\">\n\t\t\t\t<div class=\"elementor-element elementor-element-79d4cc3 e-con-full e-flex e-con e-parent\" data-id=\"79d4cc3\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ab7791c elementor-widget elementor-widget-text-editor\" data-id=\"ab7791c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p class=\"p1\">Effective password management is essential for maintaining security and operational efficiency in corporate macOS environments. Using Applivery, IT teams can remotely update user passwords across all managed Mac devices, ensuring consistent configuration, improved compliance, and reduced manual workload.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cda58a9 elementor-alert-info elementor-widget elementor-widget-alert\" data-id=\"cda58a9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"alert.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-alert\" role=\"alert\">\n\n\t\t\t\t\t\t<span class=\"elementor-alert-title\">Note<\/span>\n\t\t\t\n\t\t\t\t\t\t<span class=\"elementor-alert-description\">The <strong>Applivery Agent App for macOS<\/strong> must be enabled on the device. You can learn more about the macOS Agent <a href=\"https:\/\/www.applivery.com\/docs\/mobile-device-management\/apple-mdm\/apple-agent\/apple-mdm-agent\/\">here<\/a>.<\/span>\n\t\t\t\n\t\t\t\t\t\t<button type=\"button\" class=\"elementor-alert-dismiss\" aria-label=\"Dismiss this alert.\">\n\t\t\t\t\t\t\t\t\t<span aria-hidden=\"true\">&times;<\/span>\n\t\t\t\t\t\t\t<\/button>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-39d15bd elementor-widget elementor-widget-heading\" data-id=\"39d15bd\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Step 1 - Create your script<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fda26f9 elementor-alert-info elementor-widget elementor-widget-alert\" data-id=\"fda26f9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"alert.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-alert\" role=\"alert\">\n\n\t\t\t\t\t\t<span class=\"elementor-alert-title\">To begin with<\/span>\n\t\t\t\n\t\t\t\t\t\t<span class=\"elementor-alert-description\">Learn how to create scripts by following <a href=\"https:\/\/www.applivery.com\/docs\/mobile-device-management\/apple-mdm\/macos\/how-to-create-and-assign-scripts\/\">this link<\/a>.<\/span>\n\t\t\t\n\t\t\t\t\t\t<button type=\"button\" class=\"elementor-alert-dismiss\" aria-label=\"Dismiss this alert.\">\n\t\t\t\t\t\t\t\t\t<span aria-hidden=\"true\">&times;<\/span>\n\t\t\t\t\t\t\t<\/button>\n\t\t\t\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-60dd31e elementor-widget elementor-widget-text-editor\" data-id=\"60dd31e\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Copy and paste the following script into the editor, then adjust the necessary parameters:<\/p>\n<ul>\n \t<li><strong>USERNAME<\/strong> (<code>user<\/code>): Enter the macOS account username whose password you want to update.<\/li>\n \t<li><strong>NEWPASSWORD<\/strong> (<code>new_password<\/code>): Set the new password for the specified user.<\/li>\n<\/ul>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cd0dac2 elementor-widget elementor-widget-code-highlight\" data-id=\"cd0dac2\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t\t\t\t<div class=\"prismjs-default copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash line-numbers\">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>#!\/bin\/bash\n\n# Define the username and the new password\nUSERNAME=\"username\"  # Replace 'username' with the actual username\nNEWPASSWORD=\"new_password\"  # Replace 'new_password' with the desired password\n\n# Change the user's password using dscl\ndscl . -passwd \/Users\/\"$USERNAME\" \"$NEWPASSWORD\"\n\n# Check if the change was successful\nif [ $? -eq 0 ]; then\n    echo \"The password for user $USERNAME has been successfully changed.\"\nelse\n    echo \"There was an error trying to change the password for user $USERNAME.\"\nfi<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b0df3f7 elementor-widget elementor-widget-text-editor\" data-id=\"b0df3f7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Assign a descriptive name to the script and\u00a0click on <span class=\"button-add\">Create<\/span> to save it.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e03e1a7 elementor-widget elementor-widget-heading\" data-id=\"e03e1a7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Step 2 - Assign script to policy<\/h2>\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-aeb1dff elementor-widget elementor-widget-text-editor\" data-id=\"aeb1dff\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Next, go to any of your <strong>Policies<\/strong> <span style=\"color: #ff0000;\">(1)<\/span> and select the <strong>Scripts<\/strong> <span style=\"color: #ff0000;\">(2)<\/span> section from the left-hand menu. Click the <span class=\"button-add\">+ Add Script<\/span> <span style=\"color: #ff0000;\">(3)<\/span> button.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-04f5f3c elementor-widget elementor-widget-image\" data-id=\"04f5f3c\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"800\" height=\"521\" src=\"https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-1024x667.png\" class=\"attachment-large size-large wp-image-72253\" alt=\"scripts-policy\" srcset=\"https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-1024x667.png 1024w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-300x195.png 300w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-768x500.png 768w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-1536x1000.png 1536w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-2048x1333.png 2048w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/scripts-policy-360x234.png 360w\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" title=\"scripts-policy | Applivery\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c844c09 elementor-widget elementor-widget-text-editor\" data-id=\"c844c09\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Next, select the script by typing its name and choose the execution method, and add any required arguments.<\/p><p>Depending on the selected execution method, the script will run automatically in <strong>Loop<\/strong> or <strong>Once<\/strong> mode, or it can be manually triggered from the <strong>Actions<\/strong> section within the Applivery Agent when configured as <strong>On-demand<\/strong>.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b677237 elementor-widget elementor-widget-image\" data-id=\"b677237\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"629\" height=\"1024\" src=\"https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-28-at-083628-629x1024.png\" class=\"attachment-large size-large wp-image-72256\" alt=\"on-demand-scripts\" srcset=\"https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-28-at-083628-629x1024.png 629w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-28-at-083628-184x300.png 184w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-28-at-083628-768x1250.png 768w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-28-at-083628-315x512.png 315w, https:\/\/www.applivery.com\/wp-content\/uploads\/2025\/11\/Screenshot-2025-11-28-at-083628.png 800w\" sizes=\"auto, (max-width: 629px) 100vw, 629px\" title=\"on-demand-scripts | Applivery\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-145f19d elementor-widget elementor-widget-text-editor\" data-id=\"145f19d\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p>Regularly updating user passwords is a critical cybersecurity practice. Automating this task through Applivery ensures fast, secure, and consistent credential updates, reducing risks associated with outdated passwords and keeping all macOS devices aligned with corporate security standards.<\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Learn how to remotely change a macOS user password through Applivery, ensuring secure, automated, and consistent credential management across all managed devices.<\/p>\n","protected":false},"author":5,"featured_media":32390,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","format":"standard","meta":{"content-type":"","inline_featured_image":false,"footnotes":""},"product":[315],"doc_category":[332],"doc_tag":[],"class_list":["post-72252","docs","type-docs","status-publish","format-standard","has-post-thumbnail","hentry","product-apple-mdm","doc_category-macos"],"aioseo_notices":[],"year_month":"2026-05","word_count":319,"total_views":"612","reactions":{"happy":"0","normal":"0","sad":"0"},"author_info":{"name":"Karla Makowski","author_nicename":"karla-makowski","author_url":"https:\/\/www.applivery.com\/pt-br\/blog\/author\/karla-makowski\/"},"doc_category_info":[{"term_name":"macOS","term_url":"https:\/\/www.applivery.com\/docs\/mobile-device-management\/apple-mdm\/macos\/"}],"doc_tag_info":[],"knowledge_base_info":[],"knowledge_base_slug":[],"_links":{"self":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/72252","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs"}],"about":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/types\/docs"}],"author":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/comments?post=72252"}],"version-history":[{"count":4,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/72252\/revisions"}],"predecessor-version":[{"id":72279,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/docs\/72252\/revisions\/72279"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/media\/32390"}],"wp:attachment":[{"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/media?parent=72252"}],"wp:term":[{"taxonomy":"product","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/product?post=72252"},{"taxonomy":"doc_category","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/doc_category?post=72252"},{"taxonomy":"doc_tag","embeddable":true,"href":"https:\/\/www.applivery.com\/pt-br\/wp-json\/wp\/v2\/doc_tag?post=72252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}