Admin password in standard user account not working

Questions about other topics - please check if your question fits better in another category before posting here
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
maks

Admin password in standard user account not working

Post by maks »

Hi,

I tried searching about this issue, but didn't find my answer. I have two user accounts, one administrator, and one standart user. In the standart user account, when I open some password required tasks, like opening the Software Manager, my admin account password is refused, saying "incorrect password"... What am I missing here? Thanks for any help!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 3 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Admin password in standard user account not working

Post by karlchen »

Hello, maks.

Yep, the thing which you are missing is pretty simple:

The difference between an "administrative" user and a "standard" user is this:

The administrative user has been granted the privilege of running programmes and commands as user root by
+ prefixing sudo or gksudo to the commandline and by
+ entering his user password to prove he is really himself.

The standard user has not been granted this privilege.
This is why the standard user cannot install software with the help of Synaptic or Software Center e.g.

The difference is by design and it is part of the Linux security concept. No normal user (standard user) must be able to modify the system in any way.

Kind regards,
Karl
Last edited by karlchen on Sun Mar 30, 2014 8:00 pm, edited 1 time in total.
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
maks

Re: Admin password in standard user account not working

Post by maks »

Thanks for your reply karlchen. Ok that makes sense somehow, but why does it ask for a password then when I try to open the software manager, instead of just denying the access? So is there no way to open admin tasks from a standard user account at all, if I have the admin credentials, as you can e.g in Windows...?
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Admin password in standard user account not working

Post by karlchen »

Hello, maks.

Yes, there is a way, because you know the logon credentials of the standard user and the logon credentials of the administrative user.


Starting point:
You are logged on as the standard user. - You want to install some piece of software from the official repositories with the help of synaptic.
Clicking on "Synaptic Package Manager" in the menu or executing the commandline

Code: Select all

gksudo synaptic
will bring no joy, because the standard user is not allowed to use sudo or gksudo in order to execute Synaptic with root privileges.


Switching to the administrative user ....

(1) Menu => System => New Login:
The menu item "New login", which executes the command "mdmflexiserver", allows you to start a second graphical session without logging off from the current graphical session.
So you might click on "New login" and login as administrator. Next you can launch Synaptic as usual.
Once you have finished and terminated Synaptic, exit from the second graphical session by logging off.
You will be able to switch back to the standard user session.


(2) Using the su command:
Alternatively you can proceed like this:
Logged in as the standard user open a terminal window.
In the terminal window you execute the commandline

Code: Select all

su - administrator
Replace the term administrator by the real account name of your administrative user. You will be asked to enter the password of your administrative user. Type it and press enter.
Now execute

Code: Select all

gksudo synaptic
You will have to enter the password of your administrative user once more to convince gksudo that you are entitled to run synaptic with root privileges.
Once you have finished and terminated Synaptic, exit from the terminal window by executing

Code: Select all

exit
twice.

HTH,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
maks

Re: Admin password in standard user account not working

Post by maks »

Hi,

thanks for the detailed instructions.
For the first method, I don't have a system menu. I'm using Mint 16 Cinnamon btw, probably that's why?

As for the second method, when I execute the gksudo synaptic command I get the following error:

"No protocol specified

(gksudo:7005): Gtk-WARNING **: cannot open display: :20"...
User avatar
austin.texas
Level 20
Level 20
Posts: 12003
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: Admin password in standard user account not working

Post by austin.texas »

If you want the standard user to have administrative privileges, you can log into the administrative account, open a terminal, and enter the command:
groups
to list the groups that the administrator is a member of.

Then make the standard user a member of the groups you choose:
sudo usermod -a -G group1,group2,group3 username

EXAMPLE:
sudo usermod -a -G sudo,adm,sambashare username
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Admin password in standard user account not working

Post by karlchen »

Hello, austin.texas.

What you suggest is making the standard user an administrator user as well. This of course possible. This was not the question, however.

Moreover you can achieve that goal of making the standard user an administrator user very easily by using the "Users and Groups" menu item, too. This may be more convenient and more secure for less experienced Linux Mint users.

Hello, maks.

Very likely you will have to use

Code: Select all

sudo synaptic
instead of

Code: Select all

gksudo synaptic
in the situation where the standard user has "su"ed to the administrator account and the administrator account now wants to start something as root.

About the "New login":
Mint 16 uses Cinnamon 2.0.14 just like my Mint 13 with Cinnamon 2.0.14. Therefore I would be amazed if no "System" menu were present. I use the localized German menu. The submenu is called "Systemverwaltung". So maybe the genuine English name is "System Administration".
You might also locate the menu item "New login" by going through the "All Applications" list.

Kind regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
User avatar
Pilosopong Tasyo
Level 6
Level 6
Posts: 1432
Joined: Mon Jun 22, 2009 3:26 am
Location: Philippines

Re: Admin password in standard user account not working

Post by Pilosopong Tasyo »

maks wrote:So is there no way to open admin tasks from a standard user account at all, if I have the admin credentials...
Try pkexec in lieu of gksudo. It's akin to "run program as user with admin rights." IINM, one of the differences between the two is, gksudo requires your account to be a member of the sudoers file, whereas any user can "run as" admin via pkexec (provided they know that admin's password).

For example, in a Terminal window, running

Code: Select all

gksudo gparted
on a standard user account will fail after entering the password, but

Code: Select all

pkexec gparted
should work.

Image

Caveat: Casual testing indicates that it works with some apps, but not on others. E.g. Mint's Software Manager AKA mintinstall is giving error messages in a terminal window. So, YMMV.

Click here for additional reading material. HTH.
o Give a man a fish and he will eat for a day. Teach him how to fish and he will eat for a lifetime!
o If an issue has been fixed, please edit your first post and add the word [SOLVED].
josephpmh
Level 1
Level 1
Posts: 8
Joined: Wed Dec 07, 2011 10:50 pm
Location: Kensington, MD
Contact:

Re: Admin password in standard user account not working

Post by josephpmh »

I could be wrong, but wouldn't it be easier to do su?

Code: Select all

su 
[enter administrator password]

Code: Select all

/usr/lib/cinnamon-settings-users/cinnamon-settings-users.py
Change the user to adminstrator, then exit.

Back in terminal (still with su privileges)

Code: Select all

init 6
At any rate, that's what worked for me in Petra 64-bit
User avatar
karlchen
Level 23
Level 23
Posts: 18231
Joined: Sat Dec 31, 2011 7:21 am
Location: Germany

Re: Admin password in standard user account not working

Post by karlchen »

Hello, josephpmh.

You are right in stating that on Linux Mint it is possible to switch to the root identity by simply executing su and entering user root's password.

This will, however, not work on genuine Ubuntu on which Linux Mint is based. Ubuntu clearly favours switching to the root identity by using sudo. As a consequence all graphical administrative programmes which you launch from the Mint menu will follow the sudo approach. (sudo, gksudo, kdesudo, pkexec, either of them, which all expect you to enter your own user password) - Cf. RootSudo

Kind regards,
Karl
Image
The people of Alderaan have been bravely fighting back the clone warriors sent out by the unscrupulous Sith Lord Palpatine for 792 days now.
Lifeline
Locked

Return to “Other topics”