Restoring Linux user accounts (just the accounts, not data)
Robert Heller
heller at deepsoft.com
Tue Jun 22 20:27:08 UTC 2021
At Wed, 23 Jun 2021 05:03:13 +1000 kauer at biplane.com.au, "Ubuntu user technical support,? not for general discussions" <ubuntu-users at lists.ubuntu.com> wrote:
>
> On Tue, 2021-06-22 at 14:32 -0400, Robert Heller wrote:
> > Yes, but make sure there are no duplicate UIDs and GIDs. You will
> > also need to update /etc/group as well.
>
> I did mention that in my OP. The single necessary group will already
> exist by the time any import happens (but the import process will check
> it's there to make sure). The "-g" option with useradd makes sure that
> all VPN users go into the "openvpn" group and do not get their own
> individual groups. Any admins will always be added manually (or by the
> server creation automation, way ahead of any import).
>
> > You may also need information from /etc/group. If each user is in
> > their own group, you will need those lines from /etc/group
>
> For my purposes, I don't need to worry about groups. However, for the
> general case of restoring Unix accounts this is a very important point.
> And you suggest a neat way of doing it, too :-)
There are a collection of other "common" group memberships, which might not
matter on a server, but commonly matter on desktops:
cdrom (to mount CDs and DVDs) and plugdev (used for plugable devices)
dialout (user for serial ports).
On little ARM SBCs:
gpio, spi, i2c -- to access the GPIO, SPI, and I2C pins typically available on
the I/O headers.
Again, for your use case, not something to worry about, but if someone were
replicating users across a pile of Raspberry Pis or BeagleBones, this is
something to consider.
>
> Regards, K.
>
--
Robert Heller -- Cell: 413-658-7953 GV: 978-633-5364
Deepwoods Software -- Custom Software Services
http://www.deepsoft.com/ -- Linux Administration Services
heller at deepsoft.com -- Webhosting Services
More information about the ubuntu-users
mailing list