Installing a deb package in Standard User account

janjan

New Member
Joined
Jan 24, 2023
Messages
3
Reaction score
1
Credits
25
Hi. On my laptop with Linux i created an admin account and Standard account. I log in to the standard account. In the profile, can i nstall a deb package in terminal? if so, how do install it with Admin right?

Thank you in advance
 


 
You can look in to "sudo" and see how that works.
Matt is right.

You can also become the root account with the command:
Code:
sudo su -

After you authenticate, you will be in the root account. Your commands will run with superuser privileges. You can leave the "real" root account disabled, but use the "sudo su -" command when needed.

There are other variants of the "sudo su ..." command. Try a web search to learn more about "sudo" and "sudo su".
 
Yes, it is possible to install a deb package on a standard account using the terminal, however, you will need to use sudo command to install the package with admin rights. The sudo command allows a standard user to execute a command with administrative privileges.

Here is the general syntax for installing a deb package using sudo:

Copy code
sudo apt-get install package-name

You will be prompted to enter the password for the admin account. Once you enter the password, the package will be installed with admin rights.

It's also important to mention that you need to have the package already downloaded or have a way to access it, if the package is not in your system repositories you will need to add them or download the package and use the "dpkg" command to install it.

Copy code
sudo dpkg -i package-name.deb
 
Actually, better is

Code:
sudo apt install ./package-name.deb

apt will seek out and install dependencies, whereas dpkg does not. You should first cd into the folder where the .deb has been downloaded, or else specify the full path in the command above.

An alternative is to use gdebi.

To check if gdebi is installed

Code:
apt policy gdebi

and if it needs to be installed

Code:
sudo apt install gdebi

#then

sudo gdebi package-name.deb

Same routine if path needs to be specified, as above.

Advantage of gdebi is that it can be used from Terminal, or right-click the .deb file in your File Manager, and you can run it from there.

G'day @janjan and welcome to linux.org :)

What Debian-based Linux Distribution are you using?

Chris Turner
wizardfromoz

Edited - fixed syntax error, first command. Wizard
 
Last edited:
Thank you all for the suggestions. I tried all of them and it always ending up asking me the password for the USER1 (Standard User) like below:

[sudo] password for USER1:

if I put the correct password for USER1, it tells me:

USER1 is not in the sudoers file. This incident will be reported.
 
If the user is not in the user's file, I think you need to add them with sudoedit. I think that needs to be done with root.
 
1.
What Debian-based Linux Distribution are you using?

2. When you installed what I think is likely Debian, did you enter two passwords - one for you the user, and one for Root/Administrator?

BTW I edited my first command in #6 as it had a syntax error.

Thanks

Wizard
 
Quite so, and I added a post there before I came here.

Wiz
 
Hi. Thank you all for your suggestions. I will further search and test with your suggestions and will let you know of the results.
 
To add yourself to the sudoers file:

Edit the /etc/sudoers file in nano or vim as root.

Under the root entry add the user's name like so:

nameofuser ALL=(ALL:ALL) ALL

Hold down the CTRL key plus the o (letter o), then press Enter one time and lastly hold down CTRL key + X (the X key) to exit.
 

Members online


Top