Koozali.org: home of the SME Server

How to delete a user from the command line?

Offline Oromis

  • 2
  • +0/-0
How to delete a user from the command line?
« on: September 24, 2013, 09:17:08 AM »
Hello,

I need to remove a bunch of users from our SME 8.0 server. To save time, I want to write a script that deletes the users.

How can I delete a user from command line? Is it enough to do "db accounts remove xxx"? Or is something else needed?

Thanks in advance!

Oromis

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: How to delete a user from the command line?
« Reply #1 on: September 24, 2013, 11:03:12 AM »
take a look into /etc/e-smith/events/user-delete

a
Code: [Select]
db accounts delete xxx
signal-event user-delete xxx

should be enough

you should test on a virtual machine before trying on the production server...

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How to delete a user from the command line?
« Reply #2 on: September 24, 2013, 11:19:54 AM »
Oromis

The answer & many more are in the FAQ & other Documentation, so please take the time to read them.
Thanks
http://wiki.contribs.org/SME_Server:Documentation:FAQ:Section01#Deletion_of_Users_Ibays_Groups
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Oromis

  • 2
  • +0/-0
Re: How to delete a user from the command line?
« Reply #3 on: September 24, 2013, 02:00:51 PM »
Thanks. Sorry for bothering you.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: How to delete a user from the command line?
« Reply #4 on: September 25, 2013, 04:50:42 AM »
Oromis

Quote
Sorry for bothering you.

You were not bothering us, but I think it's good to show or teach you where to find basic information that answers a lot of common questions.
That way you can find the answer yourself (in a lot of cases), & enquiries here to these forums can be for more difficult problems or issues that may not have been answered as yet, or are a one off situation requiring a unique answer.

If you know where to look for common answers then your SME Server "user experience" will be a better & more fulfilling one.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.