Koozali.org: home of the SME Server

I have managed to introduce an empty field key in db accounts

Offline larieu

  • *****
  • 214
  • +0/-0
Hi,

on a test environment SME9.1. I have done this
fresh install
yum update .... signal-event....  reboot
install Lazy admin tools

imported the files generated on another test server
and "edited" the User file
by mistake the header from

Quote
#---------------------------------------------------------------------------------------------------------------------------------------#
#User |FirstName |LastName |Password |Dept |Company |Street |City |Phone |EmailForward |ForwardAddress         |Uid   |
#---------------------------------------------------------------------------------------------------------------------------------------#

had a new line in the remarks area
like this

Quote
#---------------------------------------------------------------------------------------------------------------------------------------#
#User |FirstName |LastName |Password |Dept |Company |Street |City |Phone |EmailForward |ForwardAddress
        |Uid   |
#---------------------------------------------------------------------------------------------------------------------------------------#

using then the lat-restore
it created a user like this

db accounts show
Quote
db accounts show ""
=user-deleted
    City=
    Company=
    Dept=
    EmailForward=local
    FirstName=Uid
    ForwardAddress=
    LastName=
    PasswordSet=no
    Phone=
    Shell=/usr/bin/rssh
    Street=
    Uid=5001
    VPNClientAccess=no


as you can see the key is empty "" and I am able to show it with ""
but if I try to edit it with

db accounts setprop "" anyprop anyvalidvalue
it won't work

or I am not able to delete it with
db accounts delete ""

several questions

1. this should be reported in Bugzilla against sme 9.1 as we shouldn't be able to do this in any circumstances
or in lazy admin contrib only ?

2. it is any way to remove that entry without reinstall the server?

if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: I have managed to introduce an empty field key in db accounts
« Reply #1 on: April 10, 2016, 02:00:23 PM »
larieu

Not sure if these instructions will work
https://wiki.contribs.org/SME_Server:Documentation:FAQ:Section01#Deletion_of_Users_Ibays_Groups

You can also directly edit the accounts database, although this is not recommended practice.
Make a copy of the accounts database first, just in case you corrupt the accounts database file in the process of trying to fix this entry.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline larieu

  • *****
  • 214
  • +0/-0
Re: I have managed to introduce an empty field key in db accounts
« Reply #2 on: April 10, 2016, 08:44:10 PM »
Nope

no luck
not
db accounts delete ""
or
signal-event user-delete ""
 
if everybody's life around you is better, probably yours will be better
just try to improve their life

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: I have managed to introduce an empty field key in db accounts
« Reply #3 on: April 11, 2016, 06:13:11 AM »
So try my second suggestion
eg
Open mc
browse to /home/e-smith/db/accounts
F4 to edit
Very carefully remove offending entry
F10 to Save
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.