[OpenIndiana-discuss] Is there a handy way to add users?

Harry Putnam reader at newsguy.com
Mon Oct 31 22:58:46 UTC 2016


"the outsider" <openindiana at out-side.nl> writes:

> Does useradd fail at creating the user?  Or is the user directory not
> created? 
>
> Otherwise:
> mkdir -p /home/{username}
> useradd -G {staff} {username}
>
> passwd { username} 
>
> chown -R {username} : { staff} /home/{username}
>

Seems to be a little more complicated.

mkdir -p /home/alonzo
mkdir: cannot create directory ?/home/alonzo?: Operation not
applicable

I read the bug a while back but I seem to recall it revolved around
the fact that `/home' is really only some kind of shortcut and that
one has to use /export/home to get around it.

I created a user named `harry' during installation:

But watch trying to create another one:

   useradd -s /bin/bash alonzop
   passwd alonzop
   New Password:
   Re-enter new Password:
   passwd: password successfully changed for alonzop


So using `/export'

    mkdir -p /export/home/alonzop

    ls /home
    harry

Only my original user shows up

    ls /export/home/
    alonzop  harry

But her they both are.

So yeah, it can be worked around... but a tab bit unhandy.




More information about the openindiana-discuss mailing list