Project

General

Profile

Actions

Bug #574

closed

Config upgrade for non-default admin username broken

Added by Chris Buechler almost 14 years ago. Updated almost 14 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
User Manager / Privileges
Target version:
Start date:
05/06/2010
Due date:
% Done:

50%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.0
Affected Architecture:

Description

Configs with an admin username other than 'admin' don't upgrade properly.

Actions #1

Updated by Seth Mos almost 14 years ago

  • Category changed from Configuration Upgrade to User Manager / Privileges
  • Status changed from New to Feedback
  • % Done changed from 0 to 50

Fixed the local user account sync, this had the admin user account hardcoded. It also attempted to perform a usermod operation before the user existed.

Changed the order of the local_user_set() function and corrected the hard coded username.
Appended -o to the user add operation to allow for multiple uid 0 users, which is required for the admin account.

Actions #2

Updated by Seth Mos almost 14 years ago

  • Status changed from Feedback to Resolved
Actions #3

Updated by Jim Pingle almost 14 years ago

  • Status changed from Resolved to New

This is now giving admin a shell of /bin/sh when it should be /etc/rc.initial

Actions #4

Updated by Erik Fonnesbeck almost 14 years ago

The line already said /bin/sh, but if that part wasn't working before, then it wouldn't have changed it. It is probably the line that looks like this:

$cmd = "/usr/sbin/pw usermod -q -n {$user_name} -s /bin/sh -H 0";

If it is only used for users that should get the console menu, then it should probably look like this instead:

$cmd = "/usr/sbin/pw usermod -q -n {$user_name} -s /etc/rc.initial -H 0";
Actions #5

Updated by Seth Mos almost 14 years ago

  • Status changed from New to Feedback

Changed the pw usermod for the administrator account from /bin/sh to /etc/rc.initial. This should fix the wrong shell.

https://rcs.pfsense.org/projects/pfsense/repos/mainline/commits/883b25522646849a376438c6413b0b5fd008e60f

Actions #6

Updated by Seth Mos almost 14 years ago

  • Status changed from Feedback to Resolved

Verified that this change correctly sets the shell for the administrator user.

Actions

Also available in: Atom PDF