Skip to content

Instantly share code, notes, and snippets.

@makruger
Last active August 27, 2016 12:34
Show Gist options
  • Select an option

  • Save makruger/59a3c0ab6a349228ad2d0041ac4e5185 to your computer and use it in GitHub Desktop.

Select an option

Save makruger/59a3c0ab6a349228ad2d0041ac4e5185 to your computer and use it in GitHub Desktop.
July 28, 2016
This discussion relates to problems using the -m switch with useradd when creating new accounts.
[00:46:52] <d5end> hi. when I try to create a new user: "# useradd -m -s /bin/bash user1" I get the following error: UX: useradd: ERROR: Unable to create the home directory: Operation not applicable.
[00:48:14] <d5end> It was a bug related to this problem (issue 263) but it says it was fixed.
[00:52:24] <d5end> Well it seems it's still there
[08:29:45] <alp> d5end: so far we can't fix it properly, as home directories (/home/$user) are auto-mounted. useradd can't create directories on auto-mounted FS.
[08:36:09] <nikolam> It may be that using /export/home by default , without pointing to /home in any way, could resolve it? Still dunno why /home is there by default anyway, for some compatibility?
[08:47:53] <alp> yes
[08:49:28] <alp> OI /dev had several patches so that useradd would create necessary automap entries and used /export/home if /home is auto-mounted, but these patches seems too specific to be accepted upstream
[09:07:22] <xenol> alp: do I miss something or you just talked about patches, but sent links to changes, which are already in illumos-gate?
[09:09:45] <alp> it's github issue
[09:09:53] <alp> they are not in illumos-gate
[09:10:16] <alp> github shows changesets from oi fork in such way
[09:12:29] <alp> trisk: Hi, perhaps, you have some ideas?
[09:13:27] <xenol> https://github.com/illumos/illumos-gate/commit/d6271a348bada25d0a512551be0ae6a9aa334d84 is not in OI fork
[09:13:44] <xenol> I mean it it's not OI fork that's displayed there, but illumos-gate
[09:14:07] <alp> https://github.com/OpenIndiana/illumos-gate/commit/d6271a348bada25d0a512551be0ae6a9aa334d84 :)
[09:14:33] <alp> it seems you can reference all forks of the repository using commit hash
[09:16:03] <alp> for example, https://github.com/OpenIndiana/oi-userland/commit/2e6a88ab9278da5cc589a3e23f5cbcefe37d0d6c
[09:16:30] <xenol> well, that's stupid then.
[09:16:37] <xenol> and certainly misleading.
[09:17:00] <alp> yes
[09:17:19] <xenol> I think that we should try to upstream them
[09:17:25] <xenol> and if not, apply it locally?
[09:18:39] <alp> I dislike this idea
[09:18:43] <alp> for example, https://github.com/illumos/illumos-gate/commit/d6271a348bada25d0a512551be0ae6a9aa334d84
[09:18:56] <alp> we check that /home is autofs
[09:19:05] <alp> if it is, we create /export/home/user
[09:19:08] <alp> nice?
[09:19:20] <alp> not so, because you can have autofs from nfs server
[09:20:03] <alp> and you still create /export/home/bla for no reason
[09:20:29] <xenol> I suppose compatibility
[09:21:09] <xenol> well, I disable auto mounting everywhere
[09:22:00] <xenol> and use /home if I can. It is better in heterogenous environmnets unless I use NFS-backend home holders
[09:22:29] <xenol> but I haven't had needs for such setup, so can't comment
[09:23:17] <alp> the issue is that these patches work for simple cases, but can make funny things when auto_home is actually used with nfs servers
[09:23:29] *** InTheWings <InTheWings!~InTheWing@unaffiliated/inthewings> has joined #openindiana
[09:31:46] <alp> I personally end up using HOME=/export/home/alp on OI/Solaris
[09:32:33] <alp> and /usr/home/$user, /home/$user on FreeBSD or /home/$user on Linux
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment