• Adding Users via external means

    From Mortifis@VERT/ALLEYCAT to All on Thursday, October 04, 2018 17:59:36
    As a master of asking either obvious nor dumb questions :) ...

    What is the most basic requirements and format for adding a user to SBBS with login account and ability to send recieve email via auth? To be specific, if I wanted to create an account for someone with a text editor instead of uedit, makeuser.js or by logging in as sysop and adding someone?

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com [url asmf
  • From Digital Man@VERT to Mortifis on Thursday, October 04, 2018 15:15:58
    Re: Adding Users via external means
    By: Mortifis to All on Thu Oct 04 2018 05:59 pm

    As a master of asking either obvious nor dumb questions :) ...

    What is the most basic requirements and format for adding a user to SBBS with login account and ability to send recieve email via auth? To be specific, if I wanted to create an account for someone with a text editor instead of uedit, makeuser.js or by logging in as sysop and adding someone?

    I'm not really sure what you mean by "with a text editor". The Synchronet userbase (data/user.dat) is not really a text-editor friendly file format. You should use one of the provided tools to add user accounts.

    digital man

    Synchronet/BBS Terminology Definition #19:
    DTE = Data Terminal Equipment
    Norco, CA WX: 75.2øF, 59.0% humidity, 6 mph N wind, 0.14 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tony Langdon@VERT to Digital Man on Friday, October 05, 2018 15:09:00
    On 10-04-18 15:15, Digital Man wrote to Mortifis <=-

    What is the most basic requirements and format for adding a user to SBBS with login account and ability to send recieve email via auth? To be specific, if I wanted to create an account for someone with a text editor instead of uedit, makeuser.js or by logging in as sysop and adding someone?

    I'm not really sure what you mean by "with a text editor". The
    Synchronet userbase (data/user.dat) is not really a text-editor
    friendly file format. You should use one of the provided tools to add
    user accounts.

    I'm guessing the OP assumed the user file was a flat text file like a .ini file, while obviously it isn't. Only way I can see to do what they want is to have a utility that can scan a text file and crate users from that data. CSV is often a good format to start from for such purposes.

    Is makeuser.js scriptable? i.e. can you feed it information from a script? or is it purely interactive?


    ... "Klingons do NOT procrastinate! It is a...TACTICAL delay!" -- Worf
    === MultiMail/Win v0.51
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Tony Langdon on Thursday, October 04, 2018 23:13:23
    Re: Re: Adding Users via external means
    By: Tony Langdon to Digital Man on Fri Oct 05 2018 03:09 pm

    Is makeuser.js scriptable? i.e. can you feed it information from a script? or is it purely interactive?

    makeuser.js *is* a script. It's not interactive at all, it just accepts command-line parameters. It would be trivial to create another script that read from another file in another format and either called makeuser.js with the appropriate command-line arguments or just used similar underlying JS code to create each user.

    digital man

    This Is Spinal Tap quote #5:
    Nigel Tufnel: Authorities said... best leave it... unsolved.
    Norco, CA WX: 62.0øF, 89.0% humidity, 1 mph ESE wind, 0.14 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Tony Langdon@VERT to Digital Man on Friday, October 05, 2018 17:10:00
    On 10-04-18 23:13, Digital Man wrote to Tony Langdon <=-

    makeuser.js *is* a script. It's not interactive at all, it just accepts command-line parameters. It would be trivial to create another script
    that read from another file in another format and either called makeuser.js with the appropriate command-line arguments or just used similar underlying JS code to create each user.

    That was one possibility, and yes, sounds perfectly suited to being called from another script.


    ... It is a good thing for an uneducated man to read books of quotations.
    === MultiMail/Win v0.51
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Saturday, October 06, 2018 10:58:21
    Re: Adding Users via external means
    By: Mortifis to All on Thu Oct 04 2018 05:59 pm

    As a master of asking either obvious nor dumb questions :) ...

    What is the most basic requirements and format for adding a user to SBBS with login account and ability to send recieve email via auth? To be specific, if I wanted to create an account for someone with a text editor instead of uedit, makeuser.js or by logging in as sysop and adding someone?

    I'm not really sure what you mean by "with a text editor". The Synchronet userbase (data/user.dat) is not really a text-editor friendly file format. You should use one of the provided tools to add user accounts.

    digital man


    Yes, Tony was right in assuming what I was asking. I guess I just should have come out and said it the way I meant it :-P I was going to also ask what paramaters makeuser.js accepted. My intent is for my website running apache/php/mysql to be able to add users not only to that data base but also automatically add users to SBBS, so I was wondering what would be the minial requirement to add to SBBS, ie: name, alias, email, password, etc

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Saturday, October 06, 2018 11:01:18
    Re: Adding Users via external means
    By: Mortifis to All on Thu Oct 04 2018 05:59 pm

    As a master of asking either obvious nor dumb questions :) ...

    What is the most basic requirements and format for adding a user to SBBS with login account and ability to send recieve email via auth? To be specific, if I wanted to create an account for someone with a text editor instead of uedit, makeuser.js or by logging in as sysop and adding someone?

    I'm not really sure what you mean by "with a text editor". The Synchronet userbase (data/user.dat) is not really a text-editor friendly file format. You should use one of the provided tools to add user accounts.

    digital man
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net

    Ok, please disregard my previos reply, seems the makeuser.js file already answers the question when run as jsexec makeuser.js :)

    MAKEUSER v2.0 - Adds User to Synchronet User Database

    usage: jsexec makeuser.js name [-param value] [...]

    params:

    -P Password
    -R Real name
    -H Chat handle
    -G Gender (M or F)
    -B Birth date (in MM/DD/YY or DD/MM/YY format)
    -T Telephone number
    -N Netmail (Internet e-mail) address
    -A Street address
    -L Location (city, state)
    -Z Zip/Postal code
    -S Security level
    -F# Flag set #
    -FE Exemption flags
    -FR Restriction flags
    -E Expiration days
    -C Comment

    NOTE: multi-word user name and param values must be enclosed in "quotes"

    /sbbs/exec/makeuser.js executed in 0.00 seconds

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Saturday, October 06, 2018 11:28:31
    Re: Re: Adding Users via external means
    By: Tony Langdon to Digital Man on Fri Oct 05 2018 03:09 pm

    Is makeuser.js scriptable? i.e. can you feed it information from a script? or is it purely interactive?

    makeuser.js *is* a script. It's not interactive at all, it just accepts command-line parameters. It would be trivial to create another script that read from another file in another format and either called makeuser.js with the appropriate command-line arguments or just used similar underlying JS code to create each user.

    digital man


    The only issue I am having now is using the -S 50 or any other level, returns * invalid security level

    my commandline line (using square brackets resolves other issues)

    ./jsexec makeuser.js [-P] [skittles] [-R] [ "Billy Ruhben"] [-H] [Billy] [-G] [M] [-B] [09/27/64] [-N] [billy@asmf-etrucker.com] [-S] [50]

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From echicken@VERT/ECBBS to Mortifis on Saturday, October 06, 2018 11:29:07
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 11:28:31

    my commandline line (using square brackets resolves other issues)

    Can you elaborate on the other issues?

    If you really are using those square brackets in your command line, they are the likely source of your problem.

    Are you seeing a bunch of '* Invalid argument' output?

    The only issue I am having now is using the -S 50 or any other level, returns * invalid security level

    ./jsexec makeuser.js [-P] [skittles] [-R] [ "Billy Ruhben"] [-H] [Billy] [-G] [M] [-B] [09/27/64] [-N] [billy@asmf-etrucker.com] [-S] [50]

    If it's trying to turn '[50]' into a number, that will not work.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 06, 2018 13:27:26
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 11:28:31

    my commandline line (using square brackets resolves other issues)

    Can you elaborate on the other issues?

    If you really are using those square brackets in your command line, they are the likely source of your problem.

    Are you seeing a bunch of '* Invalid argument' output?

    The only issue I am having now is using the -S 50 or any other level, returns * invalid security level

    ./jsexec makeuser.js [-P] [skittles] [-R] [ "Billy Ruhben"] [-H] [Billy] [-G] [M] [-B] [09/27/64] [-N] [billy@asmf-etrucker.com] [-S] [50]

    If it's trying to turn '[50]' into a number, that will not work.

    Running without [ ] :

    ./jsexec makeuser.js -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    JSexec v3.17a-Linux (rev 1.199) Debug - Execute Synchronet JavaScript Module Compiled Oct 4 2018 18:28:11 with GCC 6.3.0

    Loading configuration files from /sbbs/ctrl
    JavaScript-C 1.8.5 2011-03-31
    JavaScript: Creating runtime: 8388608 bytes
    JavaScript: Initializing context (stack: 16384 bytes)

    Reading script from /sbbs/exec/makeuser.js
    /sbbs/exec/makeuser.js compiled in 0.01 seconds

    MAKEUSER v2.0 - Adds User to Synchronet User Database

    * Invalid argument skittles

    User record creation unsuccessful.


    Running with [ ]:

    ./jsexec makeuser.js [-P] [skittles] [-R] [ "Billy Ruhben"] [-H] [Billy] [-G] [M] [-B] [09/27/64] [-N] [billy@asmf-etrucker.com] -S 50

    JSexec v3.17a-Linux (rev 1.199) Debug - Execute Synchronet JavaScript Module Compiled Oct 4 2018 18:28:11 with GCC 6.3.0

    Loading configuration files from /sbbs/ctrl
    JavaScript-C 1.8.5 2011-03-31
    JavaScript: Creating runtime: 8388608 bytes
    JavaScript: Initializing context (stack: 16384 bytes)

    Reading script from /sbbs/exec/makeuser.js
    /sbbs/exec/makeuser.js compiled in 0.01 seconds

    MAKEUSER v2.0 - Adds User to Synchronet User Database

    * Invalid security level
    !JavaScript /sbbs/exec/makeuser.js line 74: TypeError: arg[1] is undefined /sbbs/exec/makeuser.js executed in 0.00 seconds
    !Module (makeuser.js) set exit_code: 1

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From echicken@VERT/ECBBS to Mortifis on Saturday, October 06, 2018 12:47:36
    Re: Re: Adding Users via external means
    By: Mortifis to echicken on Sat Oct 06 2018 13:27:26

    ./jsexec makeuser.js -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    From makeuser.js:

    usage: jsexec makeuser.js name [-param value] [...]

    The very first argument is meant to be the new user's alias. (Their 'real name' is param -R, their 'chat handle' is param -H.) The script is trying to create a user with the alias '-P'.

    * Invalid argument skittles

    After grabbing the first argument (-P) for the alias, it moves on to the next argument, which should be one of the -P -R -H etc. param identifiers. It finds 'skittles' instead.

    Running with [ ]:

    The square braces aren't helping. They're just leading to a different error message, which gives the illusion of making progress. :D

    (When you see square braces around here in a command or config example, that's usually a stand-in for variable data. Replace the whole thing, including square brackets, with your chosen value.)

    This amended version of your command should make a user with alias 'Billy':

    ./jsexec makeuser.js Billy -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    You probably don't need the -S 50 argument. I assume the security level will default to what's been set for new users in SCFG. (System -> New User Values
    Level.) Unless you want to specify something other than that.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 06, 2018 14:01:58
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 11:28:31

    my commandline line (using square brackets resolves other issues)

    Can you elaborate on the other issues?
    I will address the other issues in a separate post as they are more php cgi related issues


    If it's trying to turn '[50]' into a number, that will not work.


    I have been trying various commandline calls to makeuser.js ... could you show me the a correct usage example please ... my fist was

    jsexec makeuser.js -P skittles -R "Billy Rhuben" -H Billy -H M -G 09/27/64 -N billy@asmf-etrucker.com -S 50

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 06, 2018 15:34:48
    Re: Re: Adding Users via external means
    By: Mortifis to echicken on Sat Oct 06 2018 13:27:26

    ./jsexec makeuser.js -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    From makeuser.js:

    usage: jsexec makeuser.js name [-param value] [...]

    The very first argument is meant to be the new user's alias. (Their 'real name' is param -R, their 'chat handle' is param -H.) The script is trying to create a user with the alias '-P'.

    * Invalid argument skittles

    After grabbing the first argument (-P) for the alias, it moves on to the next argument, which should be one of the -P -R -H etc. param identifiers. It finds 'skittles' instead.


    ./jsexec makeuser.js Billy -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    You probably don't need the -S 50 argument. I assume the security level will default to what's been set for new users in SCFG. (System -> New User Values
    Level.) Unless you want to specify something other than that.

    well that worked good thing I've never claimed to be intelligent :-P

    Still trying to figure out how to pass those args from php in a way that jsexec makeuser can accept ... tried a few typical ...
    exec("/sbbs/exec/jsexec makeuser.js $alias -P $pass -R \"$name\" -H \"$alias\" -G $g -B $dob -N $email");

    jsexec makeuser is called by returns no errors or success just:

    JSexec v3.17a-Linux (rev 1.199) Debug - Execute Synchronet JavaScript Module Compiled Oct 4 2018 18:28:11 with GCC 6.3.0

    Loading configuration files from /sbbs/ctrl
    JavaScript-C 1.8.5 2011-03-31
    JavaScript: Creating runtime: 8388608 bytes
    JavaScript: Initializing context (stack: 16384 bytes)

    Reading script from /sbbs/exec/makeuser.js
    /sbbs/exec/makeuser.js compiled in 0.01 seconds
    /sbbs/exec/makeuser.js executed in 0.00 seconds

    JavaScript: Destroying context
    JavaScript: Destroying runtime

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Mortifis@VERT/ALLEYCAT to echicken on Saturday, October 06, 2018 15:54:52
    Re: Re: Adding Users via external means
    By: Mortifis to echicken on Sat Oct 06 2018 13:27:26

    ./jsexec makeuser.js -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    From makeuser.js:

    usage: jsexec makeuser.js name [-param value] [...]

    The very first argument is meant to be the new user's alias. (Their 'real name' is param -R, their 'chat handle' is param -H.) The script is trying to create a user with the alias '-P'.

    * Invalid argument skittles

    After grabbing the first argument (-P) for the alias, it moves on to the next argument, which should be one of the -P -R -H etc. param identifiers. It finds 'skittles' instead.

    Running with [ ]:

    The square braces aren't helping. They're just leading to a different error message, which gives the illusion of making progress. :D

    (When you see square braces around here in a command or config example, that's usually a stand-in for variable data. Replace the whole thing, including square brackets, with your chosen value.)

    This amended version of your command should make a user with alias 'Billy':

    ./jsexec makeuser.js Billy -P skittles -R "Billy Ruhben" -H Billy -G M -B 09/27/64 -N billy@asmf-etrucker.com -S 50

    You probably don't need the -S 50 argument. I assume the security level will default to what's been set for new users in SCFG. (System -> New User Values
    Level.) Unless you want to specify something other than that.

    ---
    echicken
    electronic chicken bbs - bbs.electronicchicken.com - 416-273-7230
    þ Synchronet þ electronic chicken bbs - bbs.electronicchicken.com

    Disregard my last post about executing jsexec makeuser from php exec() ... it did work just did not report success in the shell :/

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Digital Man@VERT to Mortifis on Saturday, October 06, 2018 14:00:05
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 10:58 am

    Yes, Tony was right in assuming what I was asking. I guess I just should have come out and said it the way I meant it :-P I was going to also ask what paramaters makeuser.js accepted. My intent is for my website running apache/php/mysql to be able to add users not only to that data base but also automatically add users to SBBS, so I was wondering what would be the minial requirement to add to SBBS, ie: name, alias, email, password, etc

    Only the name (alias) is required:

    MAKEUSER v2.0 - Adds User to Synchronet User Database

    usage: jsexec makeuser.js name [-param value] [...]

    params:

    -P Password
    -R Real name
    -H Chat handle
    -G Gender (M or F)
    -B Birth date (in MM/DD/YY or DD/MM/YY format)
    -T Telephone number
    -N Netmail (Internet e-mail) address
    -A Street address
    -L Location (city, state)
    -Z Zip/Postal code
    -S Security level
    -F# Flag set #
    -FE Exemption flags
    -FR Restriction flags
    -E Expiration days
    -C Comment

    NOTE: multi-word user name and param values must be enclosed in "quotes"

    digital man

    This Is Spinal Tap quote #34:
    We'd love to stand around and chat, but we've gotta sit down in the lobby Norco, CA WX: 71.5øF, 65.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Digital Man@VERT to Mortifis on Saturday, October 06, 2018 14:03:16
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 11:28 am

    The only issue I am having now is using the -S 50 or any other level, returns * invalid security level

    You might have better luck using maksuser.exe instead. Same command-line syntax.

    my commandline line (using square brackets resolves other issues)

    ./jsexec makeuser.js [-P] [skittles] [-R] [ "Billy Ruhben"] [-H] [Billy] [-G] [M] [-B] [09/27/64] [-N] [billy@asmf-etrucker.com] [-S] [50]

    The sqaure brackets are... odd. Normally unnecessary.

    digital man

    Synchronet "Real Fact" #36:
    Synchronet's Windows DLLs are built with Microsoft Visual Studio/C++.
    Norco, CA WX: 71.5øF, 65.0% humidity, 0 mph SSW wind, 0.00 inches rain/24hrs

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Saturday, October 06, 2018 18:59:56
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 10:58 am

    Yes, Tony was right in assuming what I was asking. I guess I just should have come out and said it the way I meant it :-P I was going to also ask what paramaters makeuser.js accepted. My intent is for my website running apache/php/mysql to be able to add users not only to that data base but also automatically add users to SBBS, so I was wondering what would be the minial requirement to add to SBBS, ie: name, alias, email, password, etc

    Only the name (alias) is required:


    Thank you, DM, echicken showed me the error of my ways ... I wasn't putting name first ... created a local php script that accepts args and successfully adds a use to SBBS, however, am having difficulty with my remote server passthru ... maybe 16 hours a day driving truck is impeding my sysop skills lol ... is is my php script ... migrated from sheel_exec() to exec() and now tring system() all return error 1

    php script:

    <?php
    extract($_GET);
    extract($_POST); // for future form queries
    ini_set("display_errors", 1);

    if(!$_GET['sbbs-user']) die("No User to Add ... exiting<br>");

    // $_GET values are base64_encoded on sending server in the form of <meta http-equiv="refresh" content="5; url=http://asmf-etrucker.com:81/sbbs.php?sbbs-user=....\"">
    $alias = base64_decode($_GET['sbbs-user']);
    $name = base64_decode($_GET['name']);
    $pass = base64_decode($_GET['password']);
    $gender = base64_decode($_GET['gender']);
    $dob = base64_decode($_GET['dob']);
    $email = base64_decode($_GET['email']);

    echo "alias [$alias] name [$name] email [$email] pass [$pass] Gender [$gender] dob [$dob]<br><br>"; // for testing ... all values correct

    echo "Creating SBBS User Account for alias $alias Real Name $name <br>";

    system("/sbbs/exec/jsexec makeuser.js $alias -P $pass -R \"$name\" -H $alias -G $gender -B $dob -N $email", $retval);

    echo "<br>$output Returned $retval<br><br>"; // seems to be returning 1

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com
  • From Mortifis@VERT/ALLEYCAT to Digital Man on Saturday, October 06, 2018 21:31:58
    Re: Re: Adding Users via external means
    By: Mortifis to Digital Man on Sat Oct 06 2018 11:28 am

    The only issue I am having now is using the -S 50 or any other level, returns * invalid security level

    You might have better luck using maksuser.exe instead. Same command-line syntax.

    my commandline line (using square brackets resolves other issues)

    ./jsexec makeuser.js [-P] [skittles] [-R] [ "Billy Ruhben"] [-H] [Billy] [-G] [M] [-B] [09/27/64] [-N] [billy@asmf-etrucker.com] [-S] [50]

    The sqaure brackets are... odd. Normally unnecessary.

    I discovered that the square brackets made little differrence, but did help somewhat. I added a little code to makeuser.js which showed the failing argv, turns out it was the fact that I had not included the alias as first parameter so it was skipping ahead to the first hyphenated arg ... I modified the makeuser.js a tad to filter the first args and errors out with a modified usage message if it does not include one of the -? parameters ... personal use only because I am *not* a coder :)

    ---
    þ Synchronet þ Twisted Truckers BBS web asmf-etrucker.com:81 telnet asmf-etrucker.com