1

I am experimenting with (main)UNIX users and groups configuration on my system (how many, which names they have, passwords, etc.) in Linux. Would it be possible to create a simple backup of the relevant files for the sake of preserving the working state. E.g.:

# #Here everything is fine with users/groups config
# tar -cvf users_groups_passwords.tar /etc/passwd /etc/group /etc/shadow
# #Here I do something dangerous:
# groupadd ...
# useradd ...
# passwd ...
# #Here I decide I want to restore from backup
# tar -C / -xvf users_groups_passwords.tar

Would it work? I mean:

  1. am I actually missing some config file?
  2. is there some more complex magic happening when a user/group is created/modified in modern Linux systems (kernel v5+), besides the old style UNIX configs, that would prohibit this simple backup solution?

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.