Index: src/wp-admin/admin-ajax.php
===================================================================
--- src/wp-admin/admin-ajax.php	(revision 31322)
+++ src/wp-admin/admin-ajax.php	(working copy)
@@ -61,7 +61,7 @@
 	'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'
+	'parse-media-shortcode', 'destroy-sessions', 'generate_password',
 );
 
 // Register core Ajax calls.
Index: src/wp-admin/css/forms.css
===================================================================
--- src/wp-admin/css/forms.css	(revision 31322)
+++ src/wp-admin/css/forms.css	(working copy)
@@ -1004,10 +1004,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 31322)
+++ src/wp-admin/includes/ajax-actions.php	(working copy)
@@ -2828,3 +2828,12 @@
 
 	wp_send_json_success( array( 'message' => $message ) );
 }
+
+/**
+ * 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/user-profile.js
===================================================================
--- src/wp-admin/js/user-profile.js	(revision 31322)
+++ src/wp-admin/js/user-profile.js	(working copy)
@@ -32,11 +32,50 @@
 
 	$(document).ready( function() {
 		var $colorpicker, $stylesheet, user_id, current_user_id,
-			select = $( '#display_name' );
+			select = $( '#display_name' ),
 
-		$('#pass1').val('').keyup( check_pass_strength );
-		$('#pass2').val('').keyup( check_pass_strength );
+		/* Passwords */
+
+		/**
+		 * Add a Generate Password button
+		 * Add a show password icon to view password when editing own profile
+		 * @since 4.1.0
+		 */
+		$pass1 = $( '#pass1' ),
+		$pass2 = $( '#pass2' ),
+		password_repeat = $( '.password-repeat' );
+
+		$pass2.val('').keyup( check_pass_strength );
+		
+		// Handle user entering password
+		$pass1.val('').on( 'keyup', function() {
+			check_pass_strength();
+			// Ensure fireld type is password
+			if ( 'text' === $pass1.attr( 'type' ) ) {
+				$pass1.attr( 'type', 'password' );
+			}
+			if ( 'text' === $pass2.attr( 'type' ) ) {
+				$pass2.attr( 'type', 'password' );
+			}
+		});
+
+		// Handle the Generate Password button
+		$( '#generate-password' ).on('click', function() {
+			// Send an ajax request to the server to get a new password
+			$.post( ajaxurl, { action: 'generate_password' }, function(response) {
+				$pass1.val( response ).trigger( 'keyup' );
+				$pass2.val( response );
+				check_pass_strength();
+				$pass1.attr( 'type', 'text' );
+				$pass2.attr( 'type', 'text' );
+				$pass1.focus().select();
+			});
+		});
+
 		$('#pass-strength-result').show();
+
+		/* End Passwords */
+
 		$('.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 31322)
+++ src/wp-admin/user-edit.php	(working copy)
@@ -468,18 +468,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; ?>
