Error on user (re)creation from User Manager
-
Hello all,
during a test session of pfSense 2.0.1-RELEASE I got an error after a user create-modify-delete-recreate cycle.Here are the steps I did to get the error.
-
System -> User Manager -> Users menu
-
Click on '+' icon to add a new user
-
Entry mask filled as follow
Username: myuser
Password: mypwd
(confirmation): mypwd -
Click on 'Save' button
User created correctly as expected -
Click on 'e' button associated to newly created user in order to modify it
-
Modify the 'Username' field: myuser -> myuser1
-
Click on 'Save' button
Username modified to 'myuser1' as expected -
Click on 'x' icon to delete 'myuser1' user
-
Confirm deletion by clicking on 'OK' button
-
User gets removed as expected
-
Click on '+' icon to add a new user
-
Entry mask filled as follow (the same username as first added username)
Username: myuser
Password: mypwd
(confirmation): mypwd -
Click on 'Save' button
The following error appears:
The following input errors were detected:
That username is reserved by the system.
Is this the expected correct behavior?
Thanks,
Marco -
-
Check /etc/passwd at each step, see if the original user was ever removed from there.
That error is probably coming from the old user still existing in /etc/passwd.
That may have been fixed after 2.0.1
-
Check /etc/passwd at each step, see if the original user was ever removed from there.
That error is probably coming from the old user still existing in /etc/passwd.
Yes, the old user was still present in /etc/passwd.
Manually removing it solves the problem.That may have been fixed after 2.0.1
Is there any issue tracking that fix on redmine?
I find this which could be related but not 100% sure: http://redmine.pfsense.org/issues/2066Thanks for the help.
Marco -
I'm not sure if that ticket was related, but the fix for that could have fixed this as well.
-
Just checked and the deletion case was ok but not rename.
https://github.com/bsdperimeter/pfsense/commit/bb83746870f64525e477e1ddd14adc56b894b758
Easy fix.
Would also fix itself on reboot when the users are cleaned up and resynced. For a quicker fix that doesn't require editing and files, go to Diagnostics > Command and run this in the PHP exec box:
require_once("auth.inc"); local_sync_accounts();