I need to restore /etc/shadow with the contents of /etc/shadow.bak. I don't have a sudo password but was told that maybe "Non-default shadow group permissions" would help?
I get the following
james@machine:~$ sudo -ll Matching Defaults entries for elf on 8ee2351512ca: env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin User james may run the following commands on machine: Sudoers entry: RunAsUsers: james RunAsGroups: shadow Options: !authenticate Commands: /usr/bin/find
Permissions on shadow are as follows
james@machine:~$ ls -laah /etc/shadow -rw-rw---- 1 root shadow 0 Dec 15 20:00 /etc/shadow