Bug #2066

Error when deleting all-numerical user from a "user manager"

Added by faizal md dan over 2 years ago. Updated about 2 years ago.

Status:Resolved Start date:12/27/2011
Priority:Normal Due date:
Assignee:- % Done:

100%

Category:User manager
Target version:2.1
Affected version:2.0 Affected Architecture:

Description

pfsense 2.0.1 happens to be crash when trying to delete a user from a "user manager"
try to add any username and delete it back right after you add it
no matter you disable the account 1st or you dont, it will keep crash

error code as below:-

Warning: Cannot use a scalar value as an array in /etc/inc/shaper.inc on line 3688 Warning: Invalid argument supplied for foreach() in /etc/inc/util.inc on line 646

2012-01-17_134757.jpg (106.2 kB) dli muc, 01/17/2012 07:45 am

Associated revisions

Revision a82b1ab1
Added by Jim P over 2 years ago

Be more careful when creating and removing a user, to only alter a user if it really matches the passwd entry. Fixes #2066
pw usershow likes to ignore what you want even with -n and if the user is numeric and doesn't exist, it fetches by uid. Can cause major problems if you try to remove a numeric user.

Revision 9fd14591
Added by Jim P over 2 years ago

Be more careful when creating and removing a user, to only alter a user if it really matches the passwd entry. Fixes #2066
pw usershow likes to ignore what you want even with -n and if the user is numeric and doesn't exist, it fetches by uid. Can cause major problems if you try to remove a numeric user.

History

#1 Updated by Chris Buechler over 2 years ago

  • Subject changed from pfsense crash when deleting user from a "user manager" to Error when deleting user from a "user manager"
  • Status changed from New to Feedback
  • Priority changed from High to Normal
  • Target version deleted (2.0.1)
  • Affected version changed from All to 2.0

can't replicate, will leave for further feedback

#2 Updated by dli muc over 2 years ago

Create a functional OVPN with two users. (with OpenVPN Client Export Utility Pack)
Delete than the users.
If you delete the "last" user you are not able to login via Webinterface. (sse pic.)
It crash.

#3 Updated by Jim P over 2 years ago

  • Affected version deleted (2.0)

We need a full copy of your config.xml to work with. We cannot replicate this in any circumstances that we have tried, there must be something specific to your config that is leading to this problem.

#4 Updated by dli muc over 2 years ago

Is there a email Address to send?

#5 Updated by Jim P over 2 years ago

jimp (at) pfsense [dot] org.

#6 Updated by Ermal Lu├ži over 2 years ago

Probably special characters?!

#7 Updated by dli muc over 2 years ago

But where?! i clean it up during the upgrade from 1.2.3

#8 Updated by faizal md dan over 2 years ago

i've send my config files to jimp, hopefully he can check on it
even if you start from a scratch it will still be the same
once user added and deleted, the box will be totally crash
nothing can save the box unless start to reinstall it back again

thanks ;)

#9 Updated by Jim P over 2 years ago

  • Status changed from Feedback to New

Well the key here is that you're using a username that is all numbers, apparently. Not sure how well that was tested, it's certainly not something that is common to see. I had thought we rejected those even.

If you make a user with the username "004" and then delete it, somehow the /conf/ symlink is removed as well as some files in /etc/ (like resolv.conf at least)

Needs more investigation, but as a workaround, don't use numerical usernames.

#10 Updated by Chris Buechler over 2 years ago

  • Subject changed from Error when deleting user from a "user manager" to Error when deleting all-numerical user from a "user manager"
  • Target version set to 2.1
  • Affected version set to 2.0

#11 Updated by Jim P over 2 years ago

  • Status changed from New to Feedback
  • % Done changed from 0 to 100

#12 Updated by Jim P over 2 years ago

#13 Updated by Chris Buechler about 2 years ago

  • Status changed from Feedback to Resolved

confirmed fixed

Also available in: Atom PDF