yarffaJ nalA (jnala) wrote in lj_everywhere,
yarffaJ nalA

User administration tools

I need tools to create, delete, and modify users from the command line. What such tools already exist, if any?

I had an immediate need for a user creation tool - one of our department's team leads asked me to create eight users, all with posting access to a certain community, and I had photos for most of them - so I hacked something together:

lj@lightbulb% ./lj-newuser --help
Creates a new pre-validated LiveJournal user, with username USER,
email address ADDR, name NAME, and optionally the specified community
memberships and user pictures.  Prompts for the LiveJournal database
password if not given on the command line.

  -p, --password=PASS       give USER the password PASS (default random)
  -u, --userpic=FILE        upload FILE as USER's default picture
  -c, --community=COMM1,COMM2,...
                            make USER belong to communities COMM1,COMM2,...
  -a, --paid                give user paid status
  -e, --email               send email with account details to ADDR
  -h, --help                this message

This is ./lj-newuser 0.1.  Report bugs to <jaffray@pobox.com>.

usage: ./lj-newuser [OPTIONS...] USER ADDR NAME
It's on my web page, if anyone wants it, but it's 3AM perl that's only been used once so you shouldn't trust it. I can polish it into something nicer if need be.

  • Post a new comment


    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded