Linux Lite Forums

Full Version: restricted user with some privilegies
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi.

I have some files that is very critical for me (bank accounts, passwords, etc) that I cannot effort to loose, or that get in hands of a thief if the laptop gets stolen.

So I decided to create a second user profile on the same laptop, where the home folder is encrypted and the password is a really lenghty one. So that all the most critical files is now stored in that secure users home folder.

The problem I hit now is when I tries to make backup using rsync. The backup destination is on a Veracrypt volum (supposed to). But I have run into a brick wall now.
- The user don't have permission to use Veracrypt to mount.
- If I use the other user profile (admin) to mount veracrypt, it  turnes out that the user doesn't have access to the mounted volume (mounted to a folder) - even if the user have permissions to the parent folder. Tried to set permission for the mounted folder so anyone can access+write, but to no help. The result is that rsync just returns an error because lack of permission.
- The file system into the Veracrypt volume is FAT so it shouldn't hold file permission.
- Tried to use su command to shift from admin user to new user, but the permission issue stay the same.

Temporary workaround:
Just copy all files into a partition that has no restrictions - and from there make a rsync backup using admin account. But this serves a security issue because I have les control what happens if files gets deleted and if possible to restore (for unauthorized).

So the question is - is it possible to add the new user to a group so that it can have access to mount and dismount?
We have the Lite User Manager in version 3.8.  Nice point-and-shoot interface.
Menu All Light User Manager
I did use the Linux Lite User manager to create the user. I know it is awesome, but that doesn't answer the original problem.
(02-09-2018, 02:03 AM)Sprintrdriver link Wrote: [ -> ]So the question is - is it possible to add the new user to a group so that it can have access to mount and dismount?

Hello Sprintrdriver,

be logged in as your First user.


Adding username2 in to the sudoers Group


Hold down Ctrl and Alt keys and press t (Ctrl Alt +t)

Copy/paste (or type) in to your terminal the code below, replacing the word "username2", with the actual username of your second user -

Code:
sudo usermod -a -G sudo username2

press enter
type in your password when asked (password of first user)


Explanation of this command -
  • This will modify the username2 (usermod) (actual username2)
  • and add/append (-a)
  • to the group (-G)
  • named (sudo)

Checking username2 is now in the sudo group


Afterwards you can do, replacing the word "username2", with the actual username of your second user -

Code:
groups username2

to check.


Adding/Changing sudo password of username2


If it needs the password added for the sudo group of username2
Then to do, replacing the word "username2", with the actual username of your second user -

Code:
sudo passwd username2
press enter
type username2 password
press enter
type username2 password again.
press enter
Thanks a lot - this is very helpful  ;D

From experience with Veracrypt - I know that if using norwegian characters (ÆØÅæøå), it won't accept password by terminal. May it be similar problems if I alter a user password using passwd command?
You are Welcome Smile

Here are some ways to make/generate passwords in your terminal, if it helps -

https://www.linuxliteos.com/forums/scrip...ds-anyone/