Creating New Users

Discussions About MOSS (Myst Online Server Software)

Moderator: a'moaca'

Post Reply
Rael
Member
Posts: 13
Joined: Thu Apr 07, 2011 3:31 pm

Creating New Users

Post by Rael » Fri Sep 16, 2011 4:54 pm

Hey there!

After the summer break I resumed my MOSSing, and I finally have it all: now just the accounts are missing.

My problem is I don't have the knowledge to find a way to do this myself, and the documentation lacks of comprehensible (for me) information.
I both refer to the short version on the wiki, where the issue is I don't know what to put as a hash, and I don't see any reference to the final password, and I also refer to the long version on the foundry, where I understand I need a SHA-1 hash, but the problem is the same: I don't know how to create one, nor how I put the final password, the one I write into the client.

Also, I understand there is a "compute_auth_hash" program. The problem is, however, that it doesn't get compiled by default, and I don't know of a configure flag to compile just that bit.

More: if I type a simple gcc (or g++) compute_auth_hash.c, here's what I get:

Code: Select all

[moss@myserver support]$ gcc compute_auth_hash.c
/tmp/cc2oBUmS.o: In function `main':
compute_auth_hash.c:(.text+0x1de): undefined reference to `SHA'
collect2: ld returned 1 exit status
If only I was able to compile this piece of software, then I could simply use the PHP script MercAngel provided some time ago to semi-automate user creation process. Is this right?
If you happen to have a copy of the compute_auth_hash program and you feel lazy and don't want to explain such basic stuff, just send me a link for that. It will be much appreciated anyway.


Quick recap, for lazy people, in a Yahoo! Answers style:
  • How do I create a new user for my MOSS shard, along with his password?
  • Do I need to use the SHA-1 encryption?
  • Is there a flag to compile and make just the compute_auth_hash software?

For the fourth time, thanks again for the help you're giving me: I'm really learing some precious stuff doing MOSS work!

Christian Walther
Member
Posts: 294
Joined: Sat Dec 13, 2008 10:54 am

Re: Creating New Users

Post by Christian Walther » Fri Sep 16, 2011 7:57 pm

I don’t immediately remember the answers to your other questions as it’s been a while since I played with MOSS, but the command line I used to compile compute_auth_hash (on Mac OS X) was

Code: Select all

moss/support$ gcc -o compute_auth_hash -lssl -lcrypto compute_auth_hash.c
I now see that it’s included in the top-level Makefile too, so this works too:

Code: Select all

moss$ make compute_auth_hash

Rael
Member
Posts: 13
Joined: Thu Apr 07, 2011 3:31 pm

Re: Creating New Users

Post by Rael » Fri Sep 16, 2011 9:40 pm

Christian Walther wrote:I now see that it’s included in the top-level Makefile too, so this works too:

Code: Select all

moss$ make compute_auth_hash
This works indeed. Now I'll try to figure out how to finish the work.

Thanks for the fast reply! If anyone else has more suggestion, please add them, as I'll keep reading this post :D

cjkelly1
Member
Posts: 34
Joined: Mon Dec 29, 2008 6:08 am

Re: Creating New Users

Post by cjkelly1 » Tue Sep 20, 2011 2:35 am

You can do this with a SQL query. Note that the code tag is wrapping the statement. It is all one line.
This is slightly different than is on the wiki, because I am specifying all values in the table. If you do not specify all the values, you have to state which values you are wanting to insert.

Code: Select all

insert into accounts values ('testing@example.com','testing@example.com','1234567890123456789012345678901234567890',(select uuid()),'default','f','f')
Values in order are:

name - (user's login name)
email - (can be null if you do not care - this is for your records - server does not use it)
hash - (from compute_auth_hash)
user ID - (the query I posted randomly generates this - that is the usual method)
class - (this is used if you want to serve different python to different user groups.)
visitor (t/f) - set to 'f'. There is not any reason to set it to 't', as we do not use visitors any more.
banned (t/f) - set to 'f'. When this is set to 't', this account will not be allowed to log in.

I see you have looked at "user-management" already, so the above list is just repeating it, but better to give more information than not enough, in my opinion.

Post Reply

Return to “MOSS”

Who is online

Users browsing this forum: No registered users and 2 guests