Debian and user promise

16 views
Skip to first unread message

Bas van der Vlies

unread,
Jul 27, 2020, 8:36:31 AM7/27/20
to help-c...@googlegroups.com
Hello,

I have installed the cfengine community debian packages but they use the wrong
path for 'useradd", eg:
* /sbin/useradd

On debian 9 and 10 it is installed in:
* /usr/sbin/useradd

Did I miss something or is this a bug in the debian community package?
--
--
Bas van der Vlies
| Operations, Support & Development | SURF | Science Park 140 | 1098 XG
Amsterdam
| T +31 (0) 20 800 1300 | bas.van...@surf.nl | www.surf.nl

craig.c...@northern.tech

unread,
Jul 27, 2020, 9:46:05 AM7/27/20
to help-cfengine
Funny you should mention this, I just created a user on a debian 10 VM 3 days ago.

I have /usr/sbin/useradd as well as /sbin/useradd. The debian passwd package does install useradd at /usr/sbin/useradd: https://packages.debian.org/buster/amd64/passwd/filelist

CFEngine is hard coded to /sbin/useradd regardless of community or enterprise version.

  config.h <global> 1111 #define USERADD "/sbin/useradd"

I have a symlink from usr/sbin to sbin, so maybe that is broken in your debian installation?

  lrwxrwxrwx  1 root    root        8 May 10 07:26 sbin -> usr/sbin

Could it have something to do with this usrmerge concept: https://wiki.debian.org/UsrMerge?

> This page tracks Debian support for the merged /usr directories scheme, i.e. the /{bin,sbin,lib}/ directories becoming symbolic links to /usr/{bin,sbin,lib}/.

Looking forward to figuring out what's going on for you,
Craig

Bas van der Vlies

unread,
Jul 27, 2020, 3:06:26 PM7/27/20
to craig.c...@northern.tech, help-c...@googlegroups.com
Craig,

Thanks for the pointer on most of my debian machines
* /sbin/useradd

On a fresh debian 10 installation I have what you described: sbin is linked to
/usr/sbin.
Om my debian upgrade machines i do not have this link. I just made a symlink
for now.






On Mon, 2020-07-27 at 06:46 -0700, 'craig.c...@northern.tech' via help-cfengine
wrote:
> > > T +31 (0) 20 800 1300 <+31%2020%20800%201300> | bas.van...@surf.nl |
> > www.surf.nl
> >

Bas van der Vlies

unread,
Jul 28, 2020, 3:24:23 AM7/28/20
to craig.c...@northern.tech, help-c...@googlegroups.com
Craig just a small update. I just to mkae my own debian packages and I never
encounter this problem because it is not hardcode as you mentioned but
determined by "./configure". This this output of my configure on debian 8/9/10:
```
checking for useradd... /usr/sbin/useradd
checking for usermod...
/usr/sbin/usermod
checking for userdel... /usr/sbin/userdel
```

regards

Bas van der Vlies

unread,
Jul 28, 2020, 3:40:31 AM7/28/20
to craig.c...@northern.tech, help-c...@googlegroups.com
Just some minor typo fixes ;-(

On Tue, 2020-07-28 at 07:24 +0000, Bas van der Vlies wrote:
> Craig just a small update. I used to make my own debian packages and I never
> encounter this problem because it is not hardcoded as you mentioned but

Vratislav Podzimek

unread,
Jul 28, 2020, 3:44:04 AM7/28/20
to help-c...@googlegroups.com
On Tue, 2020-07-28 at 07:24 +0000, Bas van der Vlies wrote:
> Craig just a small update. I just to mkae my own debian packages and I never
> encounter this problem because it is not hardcode as you mentioned but
> determined by "./configure". This this output of my configure on debian 8/9/10:
> ```
> checking for useradd... /usr/sbin/useradd
> checking for usermod...
> /usr/sbin/usermod
> checking for userdel... /usr/sbin/userdel
> ```
That explains why it just works on our build/test machines. :)

Thanks for your analysis, Bas!

--
Vratislav
signature.asc

craig.c...@northern.tech

unread,
Jul 28, 2020, 9:18:21 AM7/28/20
to help-cfengine
Ah, sure. This makes sense. I was thinking from the perspective of installing community packages which are essentially hard-coded, but from the result of configure as you mention.

Thanks!
Craig

Bas van der Vlies

unread,
Jul 28, 2020, 9:46:46 AM7/28/20
to craig.c...@northern.tech, help-c...@googlegroups.com
And in the masterfiles the path for user tools for debian is:
```
"path[useradd]" string => "/usr/sbin/useradd";
"path[userdel]" string => "/usr/sbin/userdel";

"path[usermod]" string => "/usr/sbin/usermod";
```

So I would expect that the debian packages had the same path. In fact for the
most os-es it is
this path. So I would expect this path in the community packages

Regards


On Tue, 2020-07-28 at 06:18 -0700, 'craig.c...@northern.tech' via help-cfengine
wrote:
> > <+31%2020%20800%201300> | bas.van...@surf.nl |
> > > > > > www.surf.nl
> > > > > >
Reply all
Reply to author
Forward
0 new messages