Restoring Linux user accounts (just the accounts, not data)

Karl Auer kauer at biplane.com.au
Tue Jun 22 19:03:13 UTC 2021


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 :-)

Regards, K.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Karl Auer (kauer at biplane.com.au)
http://www.biplane.com.au/kauer

GPG fingerprint: 2561 E9EC D868 E73C 8AF1 49CF EE50 4B1D CCA1 5170
Old fingerprint: 8D08 9CAA 649A AFEF E862 062A 2E97 42D4 A2A0 616D







More information about the ubuntu-users mailing list