You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@vcl.apache.org by Jeffrey Kirby <Je...@marist.edu> on 2013/09/03 16:54:56 UTC

User administration

I'm feeling stupid.  We have a v2.2 VCL running.  I need to add a lot of 
users to it.  We authenticate to Jasig CAS.  Still, the procedure is to 
add local users.  Is there any way to batch load users froma CSV or am I 
stuck adding one at a time through vcld -setup?  I'm not seeing anything 
in any docs anywhere.

Thanks
jeff

Re: User administration

Posted by Larry Burton <la...@runningcedar.com>.
Sorry for my misunderstanding. I thought you were trying to add users to 
the local Linux machine, eg, etc/passwd

On 09/03/2013 11:33 AM, Jeffrey Kirby wrote:
> Paste at what root prompt?  The method I'm finding in docs say to run 
> /pathto/vcld -setup and then start typing numbers to get through the 
> menu tree and enter information by hand.  I'd much rather do something 
> like
>
> /pathto/vcld -setup < loaduser.csv
>
> Alternately, I can throw it into mysql (which I'm guessing is the root 
> prompt of which you speak), but is the only place I have to do it in 
> VCL.user?  What are the required values?  Is it just unityid, 
> firstname, lastname, email, adminlevel, and lastupdate?  Is there a 
> place where this is documented that I'm just not finding?
>
> Thanks!
> jeff
>
>
>
> From: Larry Burton <la...@runningcedar.com>
> To: user@vcl.apache.org,
> Date: 09/03/2013 11:15 AM
> Subject: Re: User administration
> ------------------------------------------------------------------------
>
>
>
> Create a spreadsheet with columns for first name, last name, password. 
> Use the substring functions to create a username. Finally, use the 
> concatenate function to create the useradd command. Extend the first 
> line down, add the rest of your users. Copy the useradd column into a 
> text file, or just paste at a root prompt. If you already have a CSV 
> file, you can just create the useradd column. Not a single click, but 
> works well to add a lot of local users.
> Larry
> On 09/03/2013 10:54 AM, Jeffrey Kirby wrote:
> I'm feeling stupid.  We have a v2.2 VCL running.  I need to add a lot 
> of users to it.  We authenticate to Jasig CAS.  Still, the procedure 
> is to add local users.  Is there any way to batch load users froma CSV 
> or am I stuck adding one at a time through vcld -setup?  I'm not 
> seeing anything in any docs anywhere.
>
> Thanks
> jeff
>


Re: User administration

Posted by Jeffrey Kirby <Je...@marist.edu>.
Thanks, Josh and Dmitri!

Just the info I needed.  vi and mysql finish the problem for now. 

cheers
jeff


From:   Josh Thompson <jo...@ncsu.edu>
To:     user@vcl.apache.org, 
Date:   09/03/2013 03:36 PM
Subject:        Re: User administration



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff,

This page explains how to manually insert a record into the localauth 
table:

https://cwiki.apache.org/confluence/display/VCL/Web+Code+Installation#WebCodeInstallation-Addingextralocalaccounts



Re: User administration

Posted by Josh Thompson <jo...@ncsu.edu>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jeff,

This page explains how to manually insert a record into the localauth table:

https://cwiki.apache.org/confluence/display/VCL/Web+Code+Installation#WebCodeInstallation-Addingextralocalaccounts

As you've discovered, there is no simple way to add many local user accounts.  
However, between what Dmitri sent and the above link, you should have all the 
information you need to do it.

Josh

On Tuesday, September 03, 2013 5:29:15 PM Dmitri Chebotarov wrote:
> Jeff
> 
> Do you also need to set passwords for local users? Or just create accounts?
> 
> Updating users table probably the way to accomplish it.
> You can build  SQL query for each user using Excel (or parse input file via
> perl).
> 
> INSERT INTO user
> (unityid, affiliationid, firstname, lastname, email, lastupdated)
> VALUES
> ('$username', (SELECT id FROM affiliation WHERE name LIKE 'Local'),
> '$first_name', '$last_name', '$email_address', NOW())
> 
> If you need to set passwords - it's more complicated, as you will need
> encrypt passwords using sha1 and add salt - this will require to use
> perl/php to parse file and update DB.
> 
> --
> Thank you,
> 
> Dmitri Chebotarov
> VCL Sys Eng, Engineering & Architectural Support, TSD - Ent Servers &
> Messaging 223 Aquia Building, Ffx, MSN: 1B5
> Phone: (703) 993-6175 | Fax: (703) 993-3404
> 
> 
> From: Jeffrey Kirby
> <Je...@marist.edu>> Reply-To:
> "user@vcl.apache.org<ma...@vcl.apache.org>"
> <us...@vcl.apache.org>> Date: Tuesday, September
> 3, 2013 11:33
> To: "user@vcl.apache.org<ma...@vcl.apache.org>"
> <us...@vcl.apache.org>> Subject: Re: User
> administration
> 
> Paste at what root prompt?  The method I'm finding in docs say to run
> /pathto/vcld -setup and then start typing numbers to get through the menu
> tree and enter information by hand.  I'd much rather do something like
> 
> /pathto/vcld -setup < loaduser.csv
> 
> Alternately, I can throw it into mysql (which I'm guessing is the root
> prompt of which you speak), but is the only place I have to do it in
> VCL.user?  What are the required values?  Is it just unityid, firstname,
> lastname, email, adminlevel, and lastupdate?  Is there a place where this
> is documented that I'm just not finding?
> 
> Thanks!
> jeff
> 
> 
> 
> From:        Larry Burton
> <la...@runningcedar.com>> To:  
>      user@vcl.apache.org<ma...@vcl.apache.org>,
> Date:        09/03/2013 11:15 AM
> Subject:        Re: User administration
> ________________________________
> 
> 
> 
> Create a spreadsheet with columns for first name, last name, password. Use
> the substring functions to create a username. Finally, use the concatenate
> function to create the useradd command. Extend the first line down, add the
> rest of your users. Copy the useradd column into a text file, or just paste
> at a root prompt. If you already have a CSV file, you can just create the
> useradd column. Not a single click, but works well to add a lot of local
> users. Larry
> On 09/03/2013 10:54 AM, Jeffrey Kirby wrote:
> I'm feeling stupid.  We have a v2.2 VCL running.  I need to add a lot of
> users to it.  We authenticate to Jasig CAS.  Still, the procedure is to add
> local users.  Is there any way to batch load users froma CSV or am I stuck
> adding one at a time through vcld -setup?  I'm not seeing anything in any
> docs anywhere.
> 
> Thanks
> jeff
- -- 
- -------------------------------
Josh Thompson
VCL Developer
North Carolina State University

my GPG/PGP key can be found at pgp.mit.edu

All electronic mail messages in connection with State business which
are sent to or received by this account are subject to the NC Public
Records Law and may be disclosed to third parties.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)

iEYEARECAAYFAlImOgAACgkQV/LQcNdtPQP0LQCfdcPhbrAa99aUleSNi5rQ4aMe
QDYAnjH1Xz4zOHY2QaqJ4D6AOIsK7TU3
=RkZ8
-----END PGP SIGNATURE-----


Re: User administration

Posted by Dmitri Chebotarov <dc...@gmu.edu>.
Jeff

Do you also need to set passwords for local users? Or just create accounts?

Updating users table probably the way to accomplish it.
You can build  SQL query for each user using Excel (or parse input file via perl).

INSERT INTO user
(unityid, affiliationid, firstname, lastname, email, lastupdated)
VALUES
('$username', (SELECT id FROM affiliation WHERE name LIKE 'Local'), '$first_name', '$last_name', '$email_address', NOW())

If you need to set passwords - it's more complicated, as you will need encrypt passwords using sha1 and add salt - this will require to use perl/php to parse file and update DB.

--
Thank you,

Dmitri Chebotarov
VCL Sys Eng, Engineering & Architectural Support, TSD - Ent Servers & Messaging
223 Aquia Building, Ffx, MSN: 1B5
Phone: (703) 993-6175 | Fax: (703) 993-3404


From: Jeffrey Kirby <Je...@marist.edu>>
Reply-To: "user@vcl.apache.org<ma...@vcl.apache.org>" <us...@vcl.apache.org>>
Date: Tuesday, September 3, 2013 11:33
To: "user@vcl.apache.org<ma...@vcl.apache.org>" <us...@vcl.apache.org>>
Subject: Re: User administration

Paste at what root prompt?  The method I'm finding in docs say to run /pathto/vcld -setup and then start typing numbers to get through the menu tree and enter information by hand.  I'd much rather do something like

/pathto/vcld -setup < loaduser.csv

Alternately, I can throw it into mysql (which I'm guessing is the root prompt of which you speak), but is the only place I have to do it in VCL.user?  What are the required values?  Is it just unityid, firstname, lastname, email, adminlevel, and lastupdate?  Is there a place where this is documented that I'm just not finding?

Thanks!
jeff



From:        Larry Burton <la...@runningcedar.com>>
To:        user@vcl.apache.org<ma...@vcl.apache.org>,
Date:        09/03/2013 11:15 AM
Subject:        Re: User administration
________________________________



Create a spreadsheet with columns for first name, last name, password. Use the substring functions to create a username. Finally, use the concatenate function to create the useradd command. Extend the first line down, add the rest of your users. Copy the useradd column into a text file, or just paste at a root prompt. If you already have a CSV file, you can just create the useradd column. Not a single click, but works well to add a lot of local users.
Larry
On 09/03/2013 10:54 AM, Jeffrey Kirby wrote:
I'm feeling stupid.  We have a v2.2 VCL running.  I need to add a lot of users to it.  We authenticate to Jasig CAS.  Still, the procedure is to add local users.  Is there any way to batch load users froma CSV or am I stuck adding one at a time through vcld -setup?  I'm not seeing anything in any docs anywhere.

Thanks
jeff


Re: User administration

Posted by Jeffrey Kirby <Je...@marist.edu>.
Paste at what root prompt?  The method I'm finding in docs say to run 
/pathto/vcld -setup and then start typing numbers to get through the menu 
tree and enter information by hand.  I'd much rather do something like

/pathto/vcld -setup < loaduser.csv

Alternately, I can throw it into mysql (which I'm guessing is the root 
prompt of which you speak), but is the only place I have to do it in 
VCL.user?  What are the required values?  Is it just unityid, firstname, 
lastname, email, adminlevel, and lastupdate?  Is there a place where this 
is documented that I'm just not finding?

Thanks!
jeff



From:   Larry Burton <la...@runningcedar.com>
To:     user@vcl.apache.org, 
Date:   09/03/2013 11:15 AM
Subject:        Re: User administration



Create a spreadsheet with columns for first name, last name, password. Use 
the substring functions to create a username. Finally, use the concatenate 
function to create the useradd command. Extend the first line down, add 
the rest of your users. Copy the useradd column into a text file, or just 
paste at a root prompt. If you already have a CSV file, you can just 
create the useradd column. Not a single click, but works well to add a lot 
of local users.
Larry
On 09/03/2013 10:54 AM, Jeffrey Kirby wrote:
I'm feeling stupid.  We have a v2.2 VCL running.  I need to add a lot of 
users to it.  We authenticate to Jasig CAS.  Still, the procedure is to 
add local users.  Is there any way to batch load users froma CSV or am I 
stuck adding one at a time through vcld -setup?  I'm not seeing anything 
in any docs anywhere. 

Thanks 
jeff 


Re: User administration

Posted by Larry Burton <la...@runningcedar.com>.
Create a spreadsheet with columns for first name, last name, password. 
Use the substring functions to create a username. Finally, use the 
concatenate function to create the useradd command. Extend the first 
line down, add the rest of your users. Copy the useradd column into a 
text file, or just paste at a root prompt. If you already have a CSV 
file, you can just create the useradd column. Not a single click, but 
works well to add a lot of local users.
Larry
On 09/03/2013 10:54 AM, Jeffrey Kirby wrote:
> I'm feeling stupid.  We have a v2.2 VCL running.  I need to add a lot 
> of users to it.  We authenticate to Jasig CAS.  Still, the procedure 
> is to add local users.  Is there any way to batch load users froma CSV 
> or am I stuck adding one at a time through vcld -setup?  I'm not 
> seeing anything in any docs anywhere.
>
> Thanks
> jeff