Index: src/wp-admin/admin-ajax.php
===================================================================
--- src/wp-admin/admin-ajax.php	(revision 31518)
+++ src/wp-admin/admin-ajax.php	(working copy)
@@ -61,7 +61,8 @@
 	'query-attachments', 'save-attachment', 'save-attachment-compat', 'send-link-to-editor',
 	'send-attachment-to-editor', 'save-attachment-order', 'heartbeat', 'get-revision-diffs',
 	'save-user-color-scheme', 'update-widget', 'query-themes', 'parse-embed', 'set-attachment-thumbnail',
-	'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin'
+	'parse-media-shortcode', 'destroy-sessions', 'install-plugin', 'update-plugin',
+	'generate-password',
 );
 
 // Register core Ajax calls.
Index: src/wp-admin/css/forms.css
===================================================================
--- src/wp-admin/css/forms.css	(revision 31518)
+++ src/wp-admin/css/forms.css	(working copy)
@@ -641,6 +641,10 @@
 	width: 25em;
 }
 
+#createuser #generate-password {
+	width: auto;
+}
+
 .color-option {
 	display: inline-block;
 	width: 24%;
@@ -1004,10 +1008,6 @@
 		padding: 0;
 		line-height: 2;
 	}
-
-	.form-field #domain {
-		max-width: none;
-	}
 }
 
 @media only screen and (max-width: 768px) {
Index: src/wp-admin/includes/ajax-actions.php
===================================================================
--- src/wp-admin/includes/ajax-actions.php	(revision 31518)
+++ src/wp-admin/includes/ajax-actions.php	(working copy)
@@ -2954,3 +2954,12 @@
 
 	wp_send_json_success( $status );
 }
+
+/**
+ * Generates a password via ajax
+ *
+ * @since 4.1.0
+ */
+function wp_ajax_generate_password() {
+	wp_die( wp_generate_password( 30 ) );
+}
Index: src/wp-admin/js/password-strength-meter.js
===================================================================
--- src/wp-admin/js/password-strength-meter.js	(revision 31518)
+++ src/wp-admin/js/password-strength-meter.js	(working copy)
@@ -72,4 +72,103 @@
 
 	// Backwards compatibility.
 	passwordStrength = wp.passwordStrength.meter;
+
+	/**
+	 * Password generation tool.
+	 *
+	 * @param {sting} pass1  Selector for the first password field.
+	 * @param {sting} pass2  Selector for the second password field.
+	 * @param {sting} submit Selector for the generate password button.
+	 *
+	 */
+	wp.passwordGenerator = {
+
+		self: '',
+		pass1: '',
+		pass2: '',
+		submit: '',
+		results: $('#pass-strength-result'),
+
+		init: function( pass1, pass2, submit ) {
+
+			self = wp.passwordGenerator;
+
+			self.pass1 = $( pass1 );
+			self.pass2 = $( pass2 );
+			self.submit = $( submit );
+
+			self.pass2.val('').keyup( self.checkStrength() );
+
+			// Handle user entering password
+			self.pass1.val('').on( 'keyup', function() {
+				self.checkStrength();
+				// Ensure fireld type is password
+				if ( 'text' === self.pass1.attr( 'type' ) ) {
+					self.pass1.attr( 'type', 'password' );
+				}
+				if ( 'text' === self.pass2.attr( 'type' ) ) {
+					self.pass2.attr( 'type', 'password' );
+				}
+			});
+
+			// Handle the Generate Password button
+			$( submit ).on('click', function() {
+
+				self.generate();
+
+			});
+
+		},
+
+		generate: function() {
+
+			// Send an ajax request to the server to get a new password
+			wp.ajax.post( 'generate-password' ).always( function( response ) {
+				self.pass1.val( response ).trigger( 'keyup' );
+				self.pass2.val( response );
+				self.checkStrength();
+				self.pass1.attr( 'type', 'text' );
+				self.pass2.attr( 'type', 'text' );
+				self.pass1.focus().select();
+			});
+
+		},
+
+		checkStrength: function() {
+
+			var pass1 = self.pass1.val(), pass2 = self.pass2.val(), strength;
+
+			self.results.removeClass('short bad good strong');
+			if ( ! pass1 ) {
+				self.results.html( pwsL10n.empty );
+				return;
+			}
+
+			strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass2 );
+
+			switch ( strength ) {
+				case 2:
+					self.results.addClass('bad').html( pwsL10n.bad );
+					break;
+				case 3:
+					self.results.addClass('good').html( pwsL10n.good );
+					break;
+				case 4:
+					self.results.addClass('strong').html( pwsL10n.strong );
+					break;
+				case 5:
+					self.results.addClass('short').html( pwsL10n.mismatch );
+					break;
+				default:
+					self.results.addClass('short').html( pwsL10n['short'] );
+			}
+
+			self.results.show();
+
+		}
+
+	};
+
+	wp.passwordGenerator.init( '#pass1', '#pass2', '#generate-password' );
+
 })(jQuery);
\ No newline at end of file
Index: src/wp-admin/js/user-profile.js
===================================================================
--- src/wp-admin/js/user-profile.js	(revision 31518)
+++ src/wp-admin/js/user-profile.js	(working copy)
@@ -1,42 +1,10 @@
 /* global ajaxurl, pwsL10n */
 (function($){
 
-	function check_pass_strength() {
-		var pass1 = $('#pass1').val(), pass2 = $('#pass2').val(), strength;
-
-		$('#pass-strength-result').removeClass('short bad good strong');
-		if ( ! pass1 ) {
-			$('#pass-strength-result').html( pwsL10n.empty );
-			return;
-		}
-
-		strength = wp.passwordStrength.meter( pass1, wp.passwordStrength.userInputBlacklist(), pass2 );
-
-		switch ( strength ) {
-			case 2:
-				$('#pass-strength-result').addClass('bad').html( pwsL10n.bad );
-				break;
-			case 3:
-				$('#pass-strength-result').addClass('good').html( pwsL10n.good );
-				break;
-			case 4:
-				$('#pass-strength-result').addClass('strong').html( pwsL10n.strong );
-				break;
-			case 5:
-				$('#pass-strength-result').addClass('short').html( pwsL10n.mismatch );
-				break;
-			default:
-				$('#pass-strength-result').addClass('short').html( pwsL10n['short'] );
-		}
-	}
-
 	$(document).ready( function() {
 		var $colorpicker, $stylesheet, user_id, current_user_id,
 			select = $( '#display_name' );
 
-		$('#pass1').val('').on( 'input propertychange', check_pass_strength );
-		$('#pass2').val('').on( 'input propertychange', check_pass_strength );
-		$('#pass-strength-result').show();
 		$('.color-palette').click( function() {
 			$(this).siblings('input[name="admin_color"]').prop('checked', true);
 		});
Index: src/wp-admin/user-edit.php
===================================================================
--- src/wp-admin/user-edit.php	(revision 31518)
+++ src/wp-admin/user-edit.php	(working copy)
@@ -457,18 +457,31 @@
 	<th><label for="pass1"><?php _e( 'New Password' ); ?></label></th>
 	<td>
 		<input class="hidden" value=" " /><!-- #24364 workaround -->
-		<input type="password" name="pass1" id="pass1" class="regular-text" size="16" value="" autocomplete="off" />
-		<p class="description"><?php _e( 'If you would like to change the password type a new one. Otherwise leave this blank.' ); ?></p>
+		<input type="password" name="pass1" id="pass1" class="regular-text" value="" autocomplete="off" />
+		<input type="button" name="generate-password" id="generate-password" value="<?php _e( 'Generate Password' ); ?>" class="button hide-if-no-js" />
 	</td>
 </tr>
-<tr class="user-pass2-wrap">
-	<th scope="row"><label for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
+<tr id="password2" class="user-pass2-wrap">
+	<th><label class="password-repeat" for="pass2"><?php _e( 'Repeat New Password' ); ?></label></th>
 	<td>
-	<input name="pass2" type="password" id="pass2" class="regular-text" size="16" value="" autocomplete="off" />
-	<p class="description"><?php _e( 'Type your new password again.' ); ?></p>
-	<br />
-	<div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
-	<p class="description indicator-hint"><?php echo wp_get_password_hint(); ?></p>
+		<div class="password-repeat">
+			<input name="pass2" type="password" id="pass2" class="regular-text" value="" autocomplete="off" />
+			<br />
+			<div id="pass-strength-result"><?php _e( 'Strength indicator' ); ?></div>
+			<p class="description indicator-hint"><?php _e( 'Hint: The password should be at least seven characters long. To make it stronger, use upper and lower case letters, numbers and symbols like ! " ? $ % ^ &amp; ).' ); ?></p>
+		</div>
+		<p class="description"><?php _e( 'If you would like to change the password type or generate a new one. Otherwise leave this blank.' ); ?></p>
+		<?php if( ! IS_PROFILE_PAGE ) { ?>
+		<p class="hide-if-no-js">
+			<label for="send_password">
+				<input type="checkbox" name="send_password" id="send_password" value="1" /> <?php _e( 'Send this password to the user by email.' ); ?>
+			</label>
+			<br />
+			<label for="reset_password">
+				<input type="checkbox" name="reset_password" id="reset_password" value="1" /> <?php _e( 'Encourage the user to change their password, once logged in.' ); ?>
+			</label>
+		</p>
+		<?php } ?>
 	</td>
 </tr>
 <?php endif; ?>
Index: src/wp-admin/user-new.php
===================================================================
--- src/wp-admin/user-new.php	(revision 31518)
+++ src/wp-admin/user-new.php	(working copy)
@@ -390,6 +390,7 @@
 		<td>
 			<input class="hidden" value=" " /><!-- #24364 workaround -->
 			<input name="pass1" type="password" id="pass1" autocomplete="off" />
+			<input type="button" name="generate-password" id="generate-password" value="<?php _e( 'Generate Password' ); ?>" class="button hide-if-no-js" />
 		</td>
 	</tr>
 	<tr class="form-field form-required">
Index: src/wp-includes/script-loader.php
===================================================================
--- src/wp-includes/script-loader.php	(revision 31518)
+++ src/wp-includes/script-loader.php	(working copy)
@@ -351,6 +351,7 @@
 	) );
 
 	$scripts->add( 'user-profile', "/wp-admin/js/user-profile$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
+	$scripts->add( 'user-new', "/wp-admin/js/user-new$suffix.js", array( 'jquery', 'password-strength-meter', 'wp-util' ), false, 1 );
 	$scripts->add( 'language-chooser', "/wp-admin/js/language-chooser$suffix.js", array( 'jquery' ), false, 1 );
 
 	$scripts->add( 'user-suggest', "/wp-admin/js/user-suggest$suffix.js", array( 'jquery-ui-autocomplete' ), false, 1 );
