1

I'm on Ubuntu 22.04 LTS

I have two users account. One of them has sudo "permissions" and the other is a regular account.

My regular account was created this way:

$ sudo useradd --home=/home/my_sudo_user/my_regular_user --shell=/bin/bash my_regular_user

As you can read i intenttionaly created my regular account into my_sudo_user dir with it's own directory my_regular_user.

My intention is to avoid being logged with sudo account permissions, administrate my_regular_user easily with my_sudo_user account and avoid access internet with sudo account permissions.

Root account is locked.

After added the regular_user and have made some tweaks i can login normally, but snap-store and snaps (like firefox) are not working anymore. Others non-snap programs works fine.

How to make snap-store and snaps works in this context?

2 Answers 2

0

It look like a permission problem for your regular user account. first MMake sure your regular user is a member of the snap groupake sure your regular user is a member of the snap group sudo usermod -a -G snap my_regular_user also ensure that your regular home has the correct permission sudo usermod -a -G snap my_regular_user then create a symbolic link for the snap directory sudo ln -s /home/my_sudo_user/my_regular_user/snap /snap then log out and re log to see if it has fixed your problem

You can also remove the Snap user data directory and log out and re, it might fix it sudo rm -rf /home/my_sudo_user/my_regular_user/snap

0

I have solved this issue by editing /etc/apparmor.d/tunables/home and adding /home/my_sudo_user like this:

Find uncommented @{HOMEDIRS}=/home/

Now it looks:

@{HOMEDIRS}=/home/ /home/my_sudo_user

Save file modifications, reboot, login as regular_user and open ubuntu software (snap-store) or any snaps (ex firefox, chromium, etc) previous installed

It was a security risk keep logged and even navigating with a sudo account which has root like permissions...

Thx

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .