Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Yasushi_Kono1
Contributor
Contributor

changing the "sources" attribute of a user object via dbedit

Hi all,

one customer of our own wanted to perform a bulk operation on 5000 users. They wanted to change the "sources" and "destinations" attribute of tons of user objects.

I know dbedit pretty well but I cannot figure out the correct syntax to get it done.

Is there anyone who is able to provide me with the answer?

Thanks a lot in advance!

Kind regards,

Yasushi

0 Kudos
4 Replies
G_W_Albrecht
Legend Legend
Legend

This is worth a call to TAC - you would not want to mess up 5000 user objects... if you have good working backups you could also consult sk65680: Create users using dbedit skI3301: Editing the objects_5_0.C file via Check Point database editing utilities and sk22957: Using dbedit to create and configure network, host and group objects

 

 

CCSP - CCSE / CCTE / CTPS / CCME / CCSM Elite / SMB Specialist
0 Kudos
Yasushi_Kono1
Contributor
Contributor

Hi Günther,

thanks for your reply. I know all the stuff of the sk articles by heart.

I already tried the following Syntax:

dbedit> modify users Mark sources Alpha_Internal_Net

or

dbedit> modify users Mark sources:'Alpha_Internal_NetÄ

or 

dbedit> modify users Mark sources <uid of the object>

and so forth.

None of the commands worked out for me. That's the only challenge.

 

That is the only thing I want to know. 

Any ideas?????

Kind regards,

Yasushi

 

0 Kudos
G_W_Albrecht
Legend Legend
Legend

As i did wrote before you better contact TAC - with R80.xx versions, a lot of objects  formerly collected in objects.c are now only available in SQL database. See skI3301 stating:

In R7x, dbedit could be used for manipulating all object stored in objects_5_0.C and in other fwset files.

In R80.x, the tool is still supported, but it can manipulate only some of the objects (gateways and global properties for instance), while other objects (such as rulebase) can be managed only by the new mgmt_cli tool.

CCSP - CCSE / CCTE / CTPS / CCME / CCSM Elite / SMB Specialist
0 Kudos
PhoneBoy
Admin
Admin

I tried working this out in dbedit a while ago without success.
You might have better luck with the generic-object API, though I will admit I haven't worked it out there either.
To dump all the users with the UIDs (needed for next step): mgmt_cli -r true --format json show generic-objects class-name com.checkpoint.objects.classes.dummy.CpmiUser | jq '.objects[] | .name, .uid'
Then you can do something like: mgmt_cli -r true show generic-object uid USERUID
From there, you'll have to work out the right name/value pairs to edit.
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    CheckMates Events