Need to access /Users without root account

Joined
Mar 9, 2012
Messages
5
Reaction score
0
Points
1
Have a question about a backup job I am trying to run as user "admin" to backup everything in /Users...is there a way to make All of /Users readable to "admin" without using any sudo or root access?

This is for a Backuppc rsync job that is using PKA to connect to the client OSX machine.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
You can easily make /Users readable globally by changing the permissions on the folders but I'd highly discourage you from doing that.
 
OP
K
Joined
Mar 9, 2012
Messages
5
Reaction score
0
Points
1
without using sudo or root? No.

So there is no way for any other account than root to access /Users recursively? I have root and sudo access and can change the perms on this folder, but am not sure what to change them to.

If still not, would running the backuppc job as sudo have the effect I want?
 
OP
K
Joined
Mar 9, 2012
Messages
5
Reaction score
0
Points
1
Found the solution here.

Running Rsync and Sudo over SSH | TechniTip.Net

Clip from the article..

I often use rsync for doing backups. But if you want to do a remote backup and want to backup files and directories which are owned by different users or the root user running using rsync is difficult if you have disabled root login in your sshd_config using the statement PermitRootLogin no. For sure this is the recommended setting if your server to backup has a public IP address.
A nice and easy solution which works best for me is to use sudo. This will allow to run rsync via ssh and sudo. To get it running you have to add an entry into your sudoers config file:
/etc/sudoers
backup_user ALL=(root)NOPASSWD:/usr/bin/rsync
This will allow the user backup_user to run the command rsync as root.
Next step is to add an rsync-path parameter to the remote rsync call:
rsync --rsync-path="sudo rsync" [email protected]:/root /backup_directory
Finally rsync will automatically do an sudo to root on the remote server and all to backup all files owned by root as well.
 
C

chas_m

Guest
is there a way to make All of /Users readable to "admin" without using any sudo or root access?

You specifically asked us if there was a way to do this without using sudo. You now tell us that the solution you found uses sudo.

Okaaay ...
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top