1diff --git a/samba/filepropertiesplugin/authhelper.cpp b/samba/filepropertiesplugin/authhelper.cpp
2index 6cbbd90..ae1d696 100644
3--- a/samba/filepropertiesplugin/authhelper.cpp
4+++ b/samba/filepropertiesplugin/authhelper.cpp
5@@ -49,7 +49,7 @@ ActionReply AuthHelper::isuserknown(const QVariantMap &args)
6 }
7
8 QProcess p;
9- const auto program = QStringLiteral("pdbedit");
10+ const auto program = QStringLiteral("@samba@/bin/pdbedit");
11 const auto arguments = QStringList({QStringLiteral("--debuglevel=0"), QStringLiteral("--user"), username });
12 p.setProgram(program);
13 p.setArguments(arguments);
14@@ -88,7 +88,7 @@ ActionReply AuthHelper::createuser(const QVariantMap &args)
15 }
16
17 QProcess p;
18- p.setProgram(QStringLiteral("smbpasswd"));
19+ p.setProgram(QStringLiteral("@samba@/bin/smbpasswd"));
20 p.setArguments({
21 QStringLiteral("-L"), /* local mode */
22 QStringLiteral("-s"), /* read from stdin */
23@@ -152,7 +152,7 @@ ActionReply AuthHelper::addtogroup(const QVariantMap &args)
24 QStringLiteral("-m"),
25 QStringLiteral("{%1}").arg(user.value()) });
26 #elif defined(Q_OS_LINUX) || defined(Q_OS_HURD)
27- p.setProgram(QStringLiteral("/usr/sbin/usermod"));
28+ p.setProgram(QStringLiteral("@usermod@"));
29 p.setArguments({
30 QStringLiteral("--append"),
31 QStringLiteral("--groups"),
32diff --git a/samba/filepropertiesplugin/groupmanager.cpp b/samba/filepropertiesplugin/groupmanager.cpp
33index a2ba851..d54f6ce 100644
34--- a/samba/filepropertiesplugin/groupmanager.cpp
35+++ b/samba/filepropertiesplugin/groupmanager.cpp
36@@ -18,7 +18,7 @@ GroupManager::GroupManager(QObject *parent)
37 {
38 metaObject()->invokeMethod(this, [this] {
39 auto proc = new QProcess;
40- proc->setProgram(QStringLiteral("testparm"));
41+ proc->setProgram(QStringLiteral("@samba@/bin/testparm"));
42 proc->setArguments({QStringLiteral("--debuglevel=0"),
43 QStringLiteral("--suppress-prompt"),
44 QStringLiteral("--verbose"),
45diff --git a/samba/filepropertiesplugin/sambausershareplugin.cpp b/samba/filepropertiesplugin/sambausershareplugin.cpp
46index 4f6642e..86ea121 100644
47--- a/samba/filepropertiesplugin/sambausershareplugin.cpp
48+++ b/samba/filepropertiesplugin/sambausershareplugin.cpp
49@@ -112,7 +112,8 @@ SambaUserSharePlugin::SambaUserSharePlugin(QObject *parent)
50 bool SambaUserSharePlugin::isSambaInstalled()
51 {
52 return QFile::exists(QStringLiteral("/usr/sbin/smbd"))
53- || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"));
54+ || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))
55+ || QFile::exists(QStringLiteral("/run/current-system/sw/bin/smbd"));
56 }
57
58 void SambaUserSharePlugin::showSambaStatus()
59diff --git a/samba/filepropertiesplugin/usermanager.cpp b/samba/filepropertiesplugin/usermanager.cpp
60index 29238ce..ff20fcb 100644
61--- a/samba/filepropertiesplugin/usermanager.cpp
62+++ b/samba/filepropertiesplugin/usermanager.cpp
63@@ -138,7 +138,7 @@ bool UserManager::canManageSamba() const
64 void UserManager::load()
65 {
66 auto proc = new QProcess(this);
67- proc->setProgram(QStringLiteral("testparm"));
68+ proc->setProgram(QStringLiteral("@samba@/bin/testparm"));
69 proc->setArguments({
70 QStringLiteral("--debuglevel=0"),
71 QStringLiteral("--suppress-prompt"),