<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Missing CAP_NET_ADMIN permission]]></title><description><![CDATA[<p dir="auto">SORT OF SOLVED - posted  for info only.</p>
<p dir="auto">This  problem is  related to  Ubuntu  "Bluetooth manager" which by itself is one on the most unreliable application , my opinion,  running on Ubuntu. When in  for some unknown and I really do not care why and how reason it gets into "'AIRPLANE MODE (!)  " Qt "agent discovery "  will throw this error.<br />
Most reliable  way to get rid  of "Airplane mode " is to reboot...</p>
<p dir="auto"><strong>I would like to RESOLVE this.</strong>..</p>
<p dir="auto">I11:55:26: Starting /home/nov25-1/Qt/Nov26/Examples/Qt-6.5.0/bluetooth/build-btchat-Desktop_Qt_6_5_0_GCC_64bit-Debug/btchat...<br />
qt.bluetooth.bluez: Missing CAP_NET_ADMIN permission. Cannot determine whether a found address is of random or public type.</p>
<p dir="auto">There has been a discussion about it  and as is  customary it was scudded to "wrong version of QT"</p>
<p dir="auto">This is an issue using QT example "btchat" which is very buggy and I just cannot keep fixing the bugs in DIFFERENT version of the example .</p>
<p dir="auto">this is NOT a issue of QT version - there is something missing inn QT  implementation of "bluez" library</p>
<p dir="auto">I need somebody who know more about Linux and QT  usage of bluez that I do and help me fix this.</p>
<p dir="auto">YES  - I want to fix it , not  just have a pointless  discussion  about it.</p>
<p dir="auto">I am hoping that somebody who <strong>actually knows / used QT "btchat" example</strong> can help to fix it.</p>
<p dir="auto">And if I asked this before , it does not matter, it is still an issue ...</p>
]]></description><link>https://forum.qt.io/topic/141822/missing-cap_net_admin-permission</link><generator>RSS for Node</generator><lastBuildDate>Thu, 07 May 2026 09:30:27 GMT</lastBuildDate><atom:link href="https://forum.qt.io/topic/141822.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 29 Dec 2022 18:12:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Fri, 30 Dec 2022 10:22:26 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch said in <a href="/post/741877">Missing CAP_NET_ADMIN permission</a>:</p>
<blockquote>
<p dir="auto">sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper</p>
</blockquote>
<p dir="auto">If you require a password for your <code>sudo</code> then you have to follow one of these two routes to supply it.  Details in <code>man sudo</code>.  This would apply to any command you attempt to run via <code>sudo</code> from any program instead of typing it into a shell when you can be prompted for the password.</p>
]]></description><link>https://forum.qt.io/post/741924</link><guid isPermaLink="true">https://forum.qt.io/post/741924</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Fri, 30 Dec 2022 10:22:26 GMT</pubDate></item><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Thu, 29 Dec 2022 23:54:02 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> Making progress :automating the setcap CAP_NET_ADMIN process<br />
Now  I need to figure out how to add this "pass helper" to the .pro file .<br />
Any idea ?</p>
<p dir="auto">Added this to .pro and it partially works</p>
<p dir="auto">QMAKE_POST_LINK += $ sudo setcap CAP_NET_ADMIN=eip /home/nov25-1/Qt/Nov26/Examples/Qt-5.15.2/bluetooth/build-btchat-Desktop_Qt_5_15_2_GCC_64bit-Debug/btchat q</p>
<p dir="auto">getting this response</p>
<p dir="auto">sudo setcap CAP_NET_ADMIN=eip /home/nov25-1/Qt/Nov26/Examples/Qt-5.15.2/bluetooth/build-btchat-Desktop_Qt_5_15_2_GCC_64bit-Debug/btchat q<br />
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper<br />
sudo: a password is required<br />
make: *** [Makefile:303: btchat] Error 1</p>
<p dir="auto">so how to tell make to  use  password after the QMAKE_POST_LINK ?</p>
<p dir="auto">Adding another QMAKE_POST_LINK += q did not work ,,,,</p>
]]></description><link>https://forum.qt.io/post/741877</link><guid isPermaLink="true">https://forum.qt.io/post/741877</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Thu, 29 Dec 2022 23:54:02 GMT</pubDate></item><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Thu, 29 Dec 2022 22:08:20 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch said in <a href="/post/741856">Missing CAP_NET_ADMIN permission</a>:</p>
<blockquote>
<p dir="auto">I would like to RESOLVE this...</p>
</blockquote>
<p dir="auto">You've asked this before.  It has been answered before.  Here we are again.<br />
<a href="https://forum.qt.io/topic/141258/need-an-assistence-with-bluez-libray-errors-sort-off-repost/2">https://forum.qt.io/topic/141258/need-an-assistence-with-bluez-libray-errors-sort-off-repost/2</a></p>
<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> has an alternate version of the same thing.</p>
]]></description><link>https://forum.qt.io/post/741875</link><guid isPermaLink="true">https://forum.qt.io/post/741875</guid><dc:creator><![CDATA[ChrisW67]]></dc:creator><pubDate>Thu, 29 Dec 2022 22:08:20 GMT</pubDate></item><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Thu, 29 Dec 2022 19:45:19 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch<br />
You could use <code>QMAKE_POST_LINK</code> entry in the <code>.pro</code> file to add the necessary command, to be rerun immediately after every time you link to remake the executable file.</p>
<p dir="auto">Alternatively read <a href="https://forum.qt.io/topic/114503/missing-cap_net_admin-permission">https://forum.qt.io/topic/114503/missing-cap_net_admin-permission</a> and try to get <a class="plugin-mentions-user plugin-mentions-a" href="/user/sierdzio">@<bdi>sierdzio</bdi></a>'s edits to <code>/etc/dbus-1/system.d/bluetooth.conf</code> working for you.  If that's appropriate to your situation, I know nothing about what "dbus" is.</p>
]]></description><link>https://forum.qt.io/post/741864</link><guid isPermaLink="true">https://forum.qt.io/post/741864</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 29 Dec 2022 19:45:19 GMT</pubDate></item><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Thu, 29 Dec 2022 19:35:44 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> OK, now for  $64   hiw to make this permanent... I guess that is a question for Linux  experts.</p>
]]></description><link>https://forum.qt.io/post/741863</link><guid isPermaLink="true">https://forum.qt.io/post/741863</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Thu, 29 Dec 2022 19:35:44 GMT</pubDate></item><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Thu, 29 Dec 2022 19:08:11 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/jonb">@<bdi>JonB</bdi></a> SUCCESS<br />
( minor typo in tour post...)</p>
<p dir="auto"><img src="https://ddgobkiprc33d.cloudfront.net/9b0e5bb8-c70b-49f2-ab8e-2fee8e6f2ad2.png" alt="f6234adc-2e18-44ad-9a11-3e5e739249ca-image.png" class=" img-fluid img-markdown" /></p>
<p dir="auto">Got rid of the error , now working on why btchat is not detecting remote devices....</p>
]]></description><link>https://forum.qt.io/post/741859</link><guid isPermaLink="true">https://forum.qt.io/post/741859</guid><dc:creator><![CDATA[Anonymous_Banned275]]></dc:creator><pubDate>Thu, 29 Dec 2022 19:08:11 GMT</pubDate></item><item><title><![CDATA[Reply to Missing CAP_NET_ADMIN permission on Thu, 29 Dec 2022 18:42:52 GMT]]></title><description><![CDATA[<p dir="auto">@AnneRanch<br />
Execute [if you haven't got <code>setpcap</code> you might need <code>sudo apt-get install libcap2-bin</code>]:</p>
<pre><code>sudo setpcap CAP_NET_ADMIN=eip /path/to/your/executable
</code></pre>
<p dir="auto">Do this <em>after</em> you have built it.  Then run (without rebuilding), does the error go away?  If so it needs rerunning each time you produce the executable again.</p>
]]></description><link>https://forum.qt.io/post/741858</link><guid isPermaLink="true">https://forum.qt.io/post/741858</guid><dc:creator><![CDATA[JonB]]></dc:creator><pubDate>Thu, 29 Dec 2022 18:42:52 GMT</pubDate></item></channel></rss>