05-01-2017 01:48 AM
When i try to restore a full backup to another linux machine i get permission denied , is there any special way to go about restoration ?
I am using a non-priviledged account as i have disabled root on the server. i have allowed the non-privilege user access to the root account via sudoers but is there a way we can execute the restore with sudo as prefix before the restire command ?
05-01-2017 04:24 AM
No. I do not believe so. There is no way to modify the restore.
You can restore the file to another location or machine and then copy the file to the required location.
05-03-2017 03:16 AM
Iguess there is no option to restore
06-23-2017 04:37 AM
As asaid above you cannot restore Linux system files to another system but you can restore share or files and folders which are not system related. But yes you must have root level access and the account must be part of beoper group as per requirement. But i have tested personally restoring without root and it worked for me in past.
Try below command may help you
To add user to beoper group
# usermod -G beoper useraccount
To re-enable root, do:
# sudo passwd root
To change password
passwd -d root
Or simply add edit the passwd file as below.
# vi /etc/passwd
In below example user name is john it may contain something as given below 1001:1001 you need to change it to 0:0 so that it will be part of root access.
Before
$ grep john /etc/passwd
john:x:1001:1001::/home/alice:/bin/sh
After
$ grep john /etc/passwd
john:x:0:0::/home/john:/bin/sh