Cannot authenticate without a password
The answer, you don't. You will need to set a password in order to authenticate to do anything requiring authentication.
Unfortunately after the password has been removed you cannot even change your password as you must be able to authenticate in order to change your password in the settings / user account screen.
The fix:
Change your password using Terminal.
Click the windows key or click the dash button to go to the dashboard. In the search box type
term
and click on the program calledterminal
.Type
who am i
and press enter to verify you are logged in as the user that you want to change.Type
passwd
and press enter. It will then ask you what password you want to change it to. Enter your new password and press enter. Then it will ask you to enter your password again to verify. Enter your password again and then press enter. Your password will now be set and you will now be able to authenticate again by using your new password.
Owen
Updated on September 18, 2022Comments
-
Owen over 1 year
I have an existing function, and I'd like to add a parameter and set a default value for it so it won't affect other modules that use it.
BOOL myFunc(int A, CString& strTest);
Initializing it to NULL or 0 gives me an error message. How do I initialize strTest in my func declaration?
-
John S Gruber almost 12 yearsI'm probably the last to understand, but... Are you asking how to create/change an account that doesn't require a password to log in but you then have a password to enter when you want to change the system with sudo, gksudo, etc? Or how to have an account that doesn't require a password to either login or to use sudo?
-
Nanne over 11 yearsbut even if there is no answer, surely that doesn't mean a duplicate should be opened?
-
Jorge Castro over 11 yearspossible duplicate of Why does Ubuntu force users to create a password upon installation?
-
Admin about 10 yearsthank you so much! I wish i had seen your post two hours earlier!
-
-
Eliah Kagan almost 12 yearsThe OP's question is about how to make it so that all local authentication will work without prompting for a password--or, to put it another way, how to make it so that no local authentication is ever performed. (A proper answer to this question would have to explain how to make
sudo
work without a password, and PolicyKit as well.) -
irrational John almost 12 years@EliahKagan I'll take your word on it. It is hard for me to tell since the OP's question is not in the form of a question. Just two statements which describe how Ubuntu is (I assume) intended to work by design.
-
Eliah Kagan almost 12 yearsGood point. Indeed, my interpretation may be mistaken. I do not recommend that you delete this answer (in case my interpretation is wrong or in case it's right but the OP also intended to ask for this information).
-
Eliah Kagan almost 12 yearsI think there is actually a way to do this. You can configure
sudo
to not prompt for a password (and that includes when it's used via its graphical frontends). I suspect you can configure PolicyKit to do the same thing, though I'm not sure (if I knew how I'd post this as another answer rather than a comment). Assuming that's configured, just disable screen-lock, enable automatic login, and make the password blank. (Normally it would be bad to have a blank password, but ifsudo
and PolicyKit succeed without password authentication, then that wouldn't be a problem.) -
Jammerz858 over 11 yearsThat's the "automatic login" option. "Login without a password" is different.
-
Owen about 11 yearswhen I assign a value to strTest inside myFunc, it says Error 1 error C2678: binary '=' : no operator found which takes a left-hand operand of type 'const CString' (or there is no acceptable conversion)
-
Jerry Coffin about 11 years@Owen: right -- if you make it const, you can't assign to it. If the user hasn't passed anything, where do you expect your assignment to go? I think you need to clarify what you want to accomplish -- trying to modify something that may not have been passed doesn't seem to make much sense.
-
Owen about 11 yearsinside myFunc() another function passes a string. I would like to assign that string to myFunc's strTest. Can I use const_cast ?
-
Jerry Coffin about 11 years@Owen: Are you expecting what you assign to become visible to the caller of
myFunc
, or are you just usingstrTest
as a local variable, so modifying it only changes what's visible locally? -
Owen about 11 yearsI'm expecting your first point... "expecting what you assign to become visible to the caller of myFunc"
-
Owen about 11 yearsinstead of public, can I set static CString defArg; to private?
-
Nayana Adassuriya about 11 yearsNo prob man. It is up to you. as your requirement. if you no need to access this out side from class. make it private. :)
-
Owen about 11 yearsI just figured another way. Instead of passing by reference, I used CString pointer and later dereference it.