Trying to enter some script in the terminal to add weather, etc... and after the command is entered it asks for user password and I enter my password(however I am typing my password, the cursor never moves) and hit return and nada, incorrect password. Huh?? I read up on this over at ubuntu help page and it should work with my password. Am I missing something(obviously).![]()
-
Your root account password might be different from your user account password.
Edit: actually I was incorrect, according to this wiki, says that root account by default is locked
https://help.ubuntu.com/community/RootSudo -
-
-
try using 'su' instead and the password you normally use.
Also try 'sudo -i' and when prompted just press 'enter' with no password -- if using *buntu. -
Ubuntu by default adds the first user for sudo privileges (but I dont know why the hell they feel they have to disable the root account by removing the password for it and it adds more security)
You should be added to /etc/sudoers or to a group (which is specified in /etc/sudoers) that you should be a member of to have sudo privileges.
Yes in *nix the cursor wont move while entering the password - basically it disables the echo so whatever you type doesnt get displayed on the screen - more than good enough rather than showing how long your password is using asterik characters.
"sudo -i" would again ask for your password and I doubt it would work without entering any password. If your /etc/sudoers is configured that you have sudo access without a password it wont prompt you for a password in the first place. Your command would help you get an interactive shell as root just like a su command would (if the root account were not disabled).
There are three ways an user can be configured to have sudo access:
1. The user should enter the root password each time when asked
2. The user should enter his/her own password each time when asked
3. The user need not enter any password at all.
AFAIK Ubuntu follows method 2, and most other distros follow 1. Note 1 will not work if the root account is disabled i.e. removing the password for root account.
So to answer to your question - yes enter your own password taking care of the case and you should be good. If that doesn't work your password is incorrect or someone modified your /etc/sudoers to remove your user from the list. -
Okay, found the issue. Under "users and groups", I was listed as a group. Then under "manage group", there are group settings and there is a heading called "sudo" of which I was listed but box not checked. Checked the box and all is well.
I saw "Admin" at the beginning and thought that was the only one that needed to be checked. Oh well, learning experience.
-
also visudo and just add NOPASSWD: infront of your username and it'll never ask you for a pass in future
if there is no line for your username add one -
Yes good point about visudo, it is always advisable to use visudo to edit /etc/sudoers rather than editing directly - if you make any mistakes it wont let you exit until the sudoers file is valid.
Sudo question
Discussion in 'Linux Compatibility and Software' started by Evil Claw, Jul 29, 2011.