Comment by consp
15 hours ago
sudo useradd -m [username] ?
su [username] ?
Or am I understanding your idea about switching context wrong?
15 hours ago
sudo useradd -m [username] ?
su [username] ?
Or am I understanding your idea about switching context wrong?
This doesn't really when the CLI tool needs to access any data in your /home. There isn't a straightforward way using standard POSIX tools to share a directory with another user. (Of course it's possible, but it's not easy.)
> There isn't a straightforward way using standard POSIX tools to share a directory with another user.
* chmod lets you share with everyone
* addgroup and chown let you share with a specific group of users.
Then you set up a shared directory with common group permissions
Why would the CLI tool need to access any data in your $HOME?
Your private SSH keys? Your browser’s cookie jar? Your tax reports?
If the CLI tool needs to access arbitrary data from your home directory, then it is you. There is no security boundary between you and another user with full access to everything you own.
If you want to share specific directories, you can just put the shared directory in a common location, set it to be owned by some group, and make both users a member of that group. I don't see anything not-straightforward in there?
Or even use acl(5), which is simplier than making arbitrary groups.