Change scanner of an existing non alterable task


#1

Hello;

Due to load issues on my primary openvas server, I’m looking at using a slave scanner for some of my most ressource intensive tasks. Problem, these tasks are not alterable, so the scanner list is greyed out in the config, and cannot be changed. These tasks also currently have a lot of previous reports which I want to keep.

Is there any way / tweak to actually change scanner of an non alterable existing task without loosing existing reports ? The slave scanner will have exactly the same configuration & NVTs than the primary one.

Thanks a lot


#2

While it’s generally not a good idea to modify the database directly, in this case you could safely change the task to alterable by setting the “alterable” column of the task in the “tasks” table to 1.


#3

Thanks Matt for your reply. I’m not really used to SQL commands, so any ideas of the commands to run to do this ?

Best,


#4

Something like: “UPDATE tasks SET alterable = 1 WHERE uuid = ‘id_of_your_task’;”.

If your backend is SQLite then use command “sqlite3 gvmd.db” to run the SQL.

If your backend is Postgres, use “psql gvmd”.


#5

Is it possible to provide multiple uuid at once to update several tasks in one operation ? I’m using SQLite. Thanks !


#6

…WHERE uuid = ‘id1’ OR uuid = ‘id2’ OR uuid = ‘id3’;


#7

… WHERE uuid in (‘id1’, ‘id2’, …);

http://sqlitetutorials.com/sqlite-where.html


#8

Thanks everyone for your answers !