new agent create through database

Moderator: crythias

Post Reply
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

new agent create through database

Post by kalyana1315 »

Hi

how to create new agent through otrs database back-end . we are facing problem password value other this all are updating working fine.


any one help me. OTRS database user table how update though manually.
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: new agent create through database

Post by reneeb »

You shouldn't work on the database yourself! There's a script in the $OTRS_HOME/bin/ directory that can be used to create agents.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: new agent create through database

Post by kalyana1315 »

reneeb wrote:You shouldn't work on the database yourself! There's a script in the $OTRS_HOME/bin/ directory that can be used to create agents.

that one working fine. but we are try update through database. how to storing password in otrs database use table?
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: new agent create through database

Post by RStraub »

The goal is to create users without using plain text passwords?
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: new agent create through database

Post by reneeb »

kalyana1315 wrote: how to storing password in otrs database use table?
Check what algorithm is used to store the passwords (in Kernel/Config.pm or Kernel/Config/Defaults.pm or check the code in Kernel/System/Auth/DB.pm). Then you have to create the password using the same algorithm and set the result in the database...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: new agent create through database

Post by jojo »

don't write to the OTRS database. Never

Use the scripts provided.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: new agent create through database

Post by RStraub »

At some point you're going to need the password - or you let the user hash it and send you the hash.
From our default (3.3.5) installation without changes to the password hashing, you'd get the proper hash via:
mysql> select sha2('NewPassword',256);
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: new agent create through database

Post by kalyana1315 »

RStraub wrote:The goal is to create users without using plain text passwords?

The goal is to create users using plain text passwords
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: new agent create through database

Post by jojo »

as I said, use the provided script. Not a direct database action
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: new agent create through database

Post by crythias »

kalyana1315 wrote:The goal is to create users using plain text passwords
bin/otrs.AddUser.pl
otrs.AddUser.pl [-f firstname] [-l lastname] [-p password] [-g groupname]... [-e email] username
if you define -g with a valid group name then the user will be added that group
you can define multiple groups line this: "-g admin -g users"

Code: Select all

bin/otrs.AddUser.pl -f John -l Doe -p MySecr3t -g admin -e john.doe@example.com jdoe
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: new agent create through database

Post by kalyana1315 »

crythias wrote:
kalyana1315 wrote:The goal is to create users using plain text passwords
bin/otrs.AddUser.pl
otrs.AddUser.pl [-f firstname] [-l lastname] [-p password] [-g groupname]... [-e email] username
if you define -g with a valid group name then the user will be added that group
you can define multiple groups line this: "-g admin -g users"

Code: Select all

bin/otrs.AddUser.pl -f John -l Doe -p MySecr3t -g admin -e john.doe@example.com jdoe
hi crythias,

otrs.AddUser.pl working fine . we are trying database back end updated all new agent creating that means sql query . facing problem only password value update. table user pw values having encrypted .

how can update pw valuse useing sql query ?
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: new agent create through database

Post by crythias »

kalyana1315 wrote:how can update pw valuse useing sql query ?
Read this entire thread again until you understand that your question should not be answerable.

If you require plain text passwords, use your own backend authentication table. You can do whatever you want with that.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
reneeb
Znuny guru
Posts: 5018
Joined: 13 Mar 2011, 09:54
Znuny Version: 6.0.x
Real Name: Renée Bäcker
Company: Perl-Services.de
Contact:

Re: new agent create through database

Post by reneeb »

You can use a config option to tell otrs that the passwords are plain text. Then you can do a plain "UPDATE users SET password = ....". But plain text passwords are a #fail. When someone hacks your OTRS he/she can get access to all accounts and you know that many people reuse their passwords for several services...
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: new agent create through database

Post by jojo »

using a direct database query will always screw up caching
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: new agent create through database

Post by kalyana1315 »

jojo wrote:using a direct database query will always screw up caching
any option updating sql query User table pw values default encrypted values.
or
how to do decrypt otrs user table password using sql query

database:
pw.JPG
You do not have the required permissions to view the files attached to this post.
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: new agent create through database

Post by kalyana1315 »

crythias wrote:
kalyana1315 wrote:how can update pw valuse useing sql query ?
Read this entire thread again until you understand that your question should not be answerable.

If you require plain text passwords, use your own backend authentication table. You can do whatever you want with that.

Hi crythias,


we are trying to OTRS user table username and password use some other database(same logins using ) problem facing only pw encrypting . any update regards pw how to decrypt in OTRS and matching username and password.
crythias
Moderator
Posts: 10169
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: new agent create through database

Post by crythias »

kalyana1315 wrote:we are trying to OTRS user table username and password use some other database(same logins using ) problem facing only pw encrypting . any update regards pw how to decrypt in OTRS and matching username and password.
have otrs query your other database for authentication.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: new agent create through database

Post by jojo »

you can not decrypt passwords
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
kalyana1315
Znuny expert
Posts: 171
Joined: 24 Apr 2013, 12:29
Znuny Version: OTRS3.3
Real Name: kalyanachakravarthy M P
Company: TATA Technologies
Location: Pune,India
Contact:

Re: new agent create through database

Post by kalyana1315 »

jojo wrote:you can not decrypt passwords
how is storing database values OTRS user table username and password.

front end Add Agent option enter password is plan text but database storing encrypted password.

we are trying finding encrypted code otrs perl program ?

any one know about encrypted update me file name or path.
jojo
Znuny guru
Posts: 15019
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: new agent create through database

Post by jojo »

It seems that you have no understanding on password mechanisms in general. Passwords can not be decrypted. On login 2 hashes will be compared (the saved one, and the one computed with the given password of the user).

Read and understand all answers to the thread carefully.
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Post Reply