Discussion:
[p4] Import users from CSV
Michael Mirman
2017-05-12 10:49:46 UTC
Permalink
Can I do a p4 user command to create a new user and add all the information?
You need two commands:
"p4 user" will create a user, and then you have to run "p4 passwd" for that user to create the password.

You can run something simple like
(echo foo12345; echo foo12345) | p4 passwd <some-userid>

If your default authentication method is ldap (not perforce), then you don’t have to run "p4 passwd" for new users as long as the users are in AD.
--
Michael Mirman
MathWorks, Inc.
508-647-7555

-----Original Message-----
From: perforce-user [mailto:perforce-user-***@perforce.com] On Behalf Of sammex
Sent: Friday, May 12, 2017 4:40 AM
To: perforce-***@perforce.com
Subject: Re: [p4] Import users from CSV

Posted on behalf of forum user 'sammex'.

Basically what I need to do is to create users through a script. I looked at the
python module but didn't really understand how to create new users and set
all the information (password, name, email). The best would be to do it either
in bash or python so I can use postfix to email the users the login in password.
Can I do a p4 user command to create a new user and add all the information?
--
Please click here to see the post in its original format:
http://forums.perforce.com/index.php?/topic/5323-import-users-from-csv
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforce.com/mailman/listinfo/perforce
Michael Mirman
2017-05-12 15:35:43 UTC
Permalink
not sure if that's still allowed with security=0
It is allowed. Just tested. :-)

For security=3, you get a nice message
Passwords can only be set by 'p4 passwd' at this security level.

I think this falls under one of the security levels, which disallows cleartext passwords. I don’t remember which level that is though.
--
Michael Mirman
MathWorks, Inc.
3 Apple Hill Drive, Natick, MA 01760
508-647-7555
-----Original Message-----
Behalf Of Sambwise
Sent: Friday, May 12, 2017 11:00 AM
Subject: Re: [p4] Import users from CSV
Posted on behalf of forum user 'Sambwise'.
Once upon a time you could set the password right in the user form -- I'm
not sure if that's still allowed with security=0 or if it's completely
p4 --field User=USERNAME --field Email=EMAIL --field Password=PASSWORD
| p4 user -if
Otherwise, leave off the Password part and use a separate "p4 passwd"
command like Michael said.
--
http://forums.perforce.com/index.php?/topic/5323-import-users-from-csv
_______________________________________________
http://maillist.perforce.com/mailman/listinfo/perforce-user
_______________________________________________
perforce-user mailing list - perforce-***@perforce.com
http://maillist.perforc
Loading...