Programmatically alter user permissions The current state of the site, is configured such that authenticated members, can post specific content types and comment on everything.

What was asked of me, was the restriction of users having tagged (taxonomy) themselves as "private" (their profiles aren't accessible), not being able to perform the above operations.

Apart from assigning a new role, on user update and having one more role to manage, is there another way to do that?

Ideally I'd like to assign to a "private" user the same rights as an anonymous user but without actually making him one, since I am already filtering for authenticated users in views and such.
Well, there is a way to do this, without the need to create an extra role. The code below should give you at least a hint on how to do it. You will need to create a custom module if you don't already have one and modify the function names and code where appropriate accordingly. Be warned though: the code is not tested :)

/**
 * Implements hook_user_load().
 */
function my_module_user_load($users) {
  foreach ($users as &amp;$account) {
    // Check if the user's profile is private
    if (_my_module_user_profile_is_private($account)) {
      static $drupal_static_fast;
      if (!isset($drupal_static_fast)) {
        $drupal_static_fast['perm'] = &amp;drupal_static('user_access');
      }
      $perm = &amp;$drupal_static_fast['perm'];

      if (!isset($perm[$account-&gt;uid])) {
        // If you want, you can add here a new "virtual role"
        // $account-&gt;roles[ROLE_ID] = 'custom role';

        // Make a copy of the roles array, 
        // because we don't want to make changes on the user object
        $account_roles = $account-&gt;roles;

        // Remove the authenticated role, before querying all permissions
        if (isset($account_roles[DRUPAL_AUTHENTICATED_RID])) {
          unset($account_roles[DRUPAL_AUTHENTICATED_RID]);
        }

        // Get all permissions for user's roles
        $role_permissions = user_role_permissions($account_roles);

        $perms = array();
        foreach ($role_permissions as $one_role) {
          $perms += $one_role;
        }

        $perm[$account-&gt;uid] = $perms;
      }
    }
  }
}

/**
 * Helper function.
 *
 * Checks if a user's profile is private.
 */
function _my_module_user_profile_is_private($account = NULL) {
  if (!$account) {
    global $user;
    $account = $user;
  }
  // Check if the user's profile is private
  // ... 
  return TRUE; // just for testing
}