I am running a single-user Ubuntu install.  When I enter the password to unlock my screen after suspend/timeout, it is the same password I use for sudo - my user password.  Is there any way for me to set a different, weaker password for unlocking from sleep, so it's safe to give it to friends that, for example, are reading something on my computer and forget to wiggle the mouse without me having to give them potential root access if they decided to?  The only reason I even have a lock screen is so little siblings won't hit random keys and mess up my work when I forget and leave for a minute, so lockscreen "security" is totally a non-issue.  I am using GDM / Gnome 3.16 on Ubuntu 15.04.  I need to add that removing my login account from sudoers and using another account for sudo-related work is not a solution that I can consider.
1852
How can I give a user one password for normal usage when logging in, and another password for system administration and sudo access? I want one user to have two passwords.
76241
I want that my monitor turns off when I am inactive for a while, but I do not want that I am prompted for a password when I revoke my pc. In Ubuntu 16.04 it was possible to disable the lock but still enable the screensaver as explained .  In Ubuntu 18.04 I entered the following in terminal:  dconf-editor   and disabled ubuntu-lock-on-suspend:    However, since I made this change, my monitor never suspends anymore. I tried restart but it didn't help.  Any ideas how I can disable lock but still enable suspend mode?
121112
Is there a way through which I can make the sudo command give me permissions for a longer period than its default time?  It can be a pain having to keep entering the sudo password, when requiring the installation of many packages, so it would be nice if there exists a command or configuration that can be done to affect it usage period.
27367
I just powerwashed (that's a factory reset on chromebooks) my computer so that it would be be 'brand new,' however now I don't have sudo access anymore. I used to not need a password to use sudo, however now a password is required and I have no idea what it is. I tried my login password, however that didn't work. Any advice?
101173
I was making some changes recently, trying to rename my user account from the macOS High Sierra System Preferences, and it seems I've locked myself out from making any changes to Users &amp; Groups now.  When I click the lock icon (Click the lock to make changes) I am prompted for a User Name and Password. No matter what I input in these fields I am unable to unlock the preferences. I am sure I know my user account, otherwise I wouldn't be able to log into the computer, and there is only 1 user on my Mac.  I've also tried with:  sudo dscl . -merge /Groups/admin GroupMembership &lt;username&gt; Password: &lt;username&gt; is not in the sudoers file.  This incident will be reported.   So it seems the name change is causing a mismatch between what's in the sudoers file, so I basically have no user with admin access right now.  Does anyone know how I can reset these, even from the command line? Thanks in advance!
62458
I want to login as root, but when I enter   sudo -s   and enter password, this message is shown: "you are not in sudoers file", and when I enter   su   and enter password, this is shown: "authentication failure".  My os has one account only. about past1 hours ago I log on as root and do some commands , when I logout , I can't login another time!
88002
I am horribly impatient and can't stand the (for me subjectively long) delay of around 2 seconds after entering an incorrect password in the login screen or also as sudo password, before I can retry typing it correctly.  Is there a way to modify the delay and reduce it to around half a second or turn it completely off, both for sudo and the login screen?   The optimal solution would include a longer delay after maybe 3 or 5 incorrect passwords, to still prevent brute-forcing.  PS: I am currently using vanilla Ubuntu 16.04 with Unity Desktop and lightdm.
27279
I used to have a password prompt but then I, from somewhere in User Accounts, unchecked "Require a password for login." Now, I want Ubuntu to prompt for a password again at login screen, mainly because I have to manually unlock the login keyring whenever I access Dash or other services, which is a pain at best.  I also searched another question, namely . It was of no help because the OP's question is "I have a password but Ubuntu doesn't ask for it."  Also, the two answers provided there don't solve my problem at all. They discuss completely other things.  Is there no simple mechanism? Because intuitively, if there's a checkbox option to bypass password requirement, there should be an equally hassle-free facility to again require the password.
68962
I recently got a new laptop (Lenovo T440p with Windows 8.1 Pro) and was having the following issue: the screen would lock (screen would go black and require a password to get back in) after 1 minute. I would prefer something more like 10 or 15 minutes. So, I tried the obvious changes (check the screensaver settings, power management settings for sleep, turning off the screen, etc.), with no success. I did, however, notice a rather odd behavior: if I changed the screensaver timeout from 1 minute to anything else (say, 15 mins), clicked OK, and re-opened the screensaver settings window, it would be back to 1 minute. Odd.  At that point, I turned to Google. I found posts ( in particular was helpful) suggesting all sorts of causes and resolutions:   If you have Cisco AnyConnect VPN client (which I did), try uninstalling it. I uninstalled, rebooted, no change. Open the User Accounts control panel and, on the left side of the screen, click Reset Security Policies. My User Accounts control panel, however, has no such link. Reboot into a repair console and run "sfc /scannow". It did indeed find and repair some issues, but didn't fix the screen timeout problem. Edit the Group Policy to force a particular timeout time; the setting showed up correctly (15 mins) in screensaver settings, power management settings, etc., but the screen would still go black and lock after 1 minute. In the registry, manually change the screensaver timeout and the "turn off the screen" timeout. No luck.
36380
On busy days, I'd like to run   $ ./configure &amp;&amp; make &amp;&amp; sudo make install &amp;&amp; halt   on the night and go to bed, hoping the application would automatically be installed. But what I see the next day is the screen where sudo asks me for the password. So how could I run sudo with password in one command line, or is there any other method to do this?
53239
There is a very bad problem with the "Blank screen" function in Ubuntu 17.10. I refer to the setting accessed via Settings->Power->Blank Screen. This seems to actually perform a screen lock, since I need to enter my password after un-blanking the screen. (However, given the behavior described below it's not clear exactly what this function actually does - maybe it just logs you out? maybe it reboots the machine?)  The problem is that a simple screen lock, which one would expect to lock the screen without affecting the state of any applications, in fact closes all applications that are open when the screen lock activates. In other words, if you have the screen lock set to 5 minutes, and you walk away from your machine to get a sandwich or whatever, when you come back and unlock the machine all your apps have closed without saving their state. So far, the only work-around I have found is to entirely disable screen locking in Ubuntu 17.10. My question is, how can this be fixed so that screen locking works properly - that is: the screen locks on schedule after a period of inactivity, and when unlocked all applications that were running are still running?  I am asking a new question for the following reasons:  1) The existing answers to (and comments on)  do not address the issue, and in fact misrepresent the actual problem in ways that make me think the comment writers have not understood what is happening;  2) I cannot usefully address that question because I do not have sufficient reputation to either upvote the question or comment on it, and I cannot answer the question because I have no idea why this problem occurs;  3) I will probably never achieve a reputation of 15, much less 50, on StackExchange. Which is fine, that's not among my life goals.  4) But this question is important and deserves to be addressed. It is a drastically unacceptable bug.
5981
On one particular machine I often need to run sudo commands every now and then. I am fine with entering password on sudo in most of the cases.  However there are three sudo commands I want to run without entering password:   sudo reboot sudo shutdown -r now sudo shutdown -P now   How can I exclude these commands from password protection to sudo?
88026
Recently upgraded to Ubuntu 18.10, having two problems.  Easiest to explain: when I open "settings", go to "privacy", select "screen lock", I get the popup window with the screen lock settings, but everything is grayed out:   Second issue: If I step away from the machine for long enough (seems to be 5 minutes), the screen blanks. Hitting a key or moving the mouse wakes it up. But when it wakes up, the only things on the screen are the icon bar at the left and the top bar with status icons on the right end. The rest of the screen is blue, not my normal lock screen image. The screen isn't locked, it doesn't prompt for a password, it's just...blue.  I can move the mouse pointer around the screen, the icons react if I click on one, I can bring up the popup with volume/brightness controls on the top bar. But if the pointer is on the blue background, neither left nor right button clicks do anything.  Now, if I press ctrl-alt-F1 from there, I get a lock screen where I can enter my password. Then I get the blue screen back, but if I press ctrl-alt-F2 I get my normal screen (with running applications) back.  ctrl-alt-F2 without going through the lock screen first does nothing.  I'm not finding anything while searching that matches either of these sets of symptoms. Suggestions?
77907
Here are my circumstances:   I am running Ubuntu 12.04. I have one user account.   I absolutely hate the password requirement. How do I disable this requirement such that my Linux computer will behave more like Windows in this respect? I do not want to hear that I shouldn't this because it is not secure. This is my desire so the concern of security is effectively null and void.
44478
I have upgraded Ubuntu to 12.04 and now I have a problem in logging in after locking the screen: it says the password is incorrect even though I provide the valid password. I found a temporary solution by switching users and logging in again with the same user.
100440
Not that it's a very good idea to change it, but for fun. According to  post, there are still some problems even after changing entries in /etc/passwd, /etc/shadow, and /etc/sudoers. Any suggestions?
3943
When we install/remove/update packages or make any changes which require administrative privileges we are prompted for the password of admin user who has the sudo privileges - this happens both via GUI and terminal.    However, if we try to shutdown and restart via terminal, it complains that we need to be root:  $ reboot reboot: Need to be root  $ shutdown now shutdown: Need to be root   But we are never asked for a password when we perform these actions via the cog-wheel at top right.    Why is there this discrepancy?