PDA

View Full Version : command line won't reconize password



Zych01
3rd August 2010, 02:23 AM
While trying to download themes for fedora 12,I get to the end it ask for my PW (in sudo) then says
it is incorrect.When in graphic inter phase all my passwords are excepted.I've been reading the linux manuel.
but can't find the anwser.If I am to put anouther password in where do I do that and how.

PabloTwo
3rd August 2010, 02:27 AM
For sudo, you enter your user password, not roots password like you do if switching to root using "su" or "su -". I suspect you are entering roots password when prompted by sudo.

Zych01
3rd August 2010, 04:49 AM
Thank you for you reply. I tried my user password that did not work it reported me!(to myself)
When I use my user name It says(user name) not in the sudoers file.

leigh123linux
3rd August 2010, 06:38 AM
Sudo isn't setup in fedora, use su instead.



su


or for full root



su -

hmmsjan
3rd August 2010, 07:06 AM
Dear All,

sudo is implemented in Fedora, but not used as standard like in Ubuntu.
You have to enter your name in the /etc/sudoers file, and better do
it with /usr/sbin/visudo, and not by directly editing the /etc/sudoers.

with a line in /etc/sudoers like:

username ALL=(ALL) ALL

the user "username" can give all commands in superuser mode, after entering the users password, not
the root password.

In that way it's possible to give the user access to some or all administration commands without
telling him the root password, as with "su"

Good luck

Zych01
3rd August 2010, 03:48 PM
Thank you for the help so far. I tried su, invalid option.su- command not found.
Also tried /usr/sbin/visudo permission denied,in trying to set up sudo login.

hmmsjan
3rd August 2010, 06:14 PM
Thank you for the help so far. I tried su, invalid option.su- command not found.
Also tried /usr/sbin/visudo permission denied,in trying to set up sudo login.

Dear Zych01,

The command is "su -" with a space between su and "-", and visudo
should be executed (of course) as superuser!

Back to the original post: If you download themes, I presume at the end there is asked for a password because system files have
to be modified. In Fedora, you need the password of user "root" for that, in Ubuntu you need your own users password.



Good Luck!

Zych01
8th August 2010, 01:59 AM
Hi I'm back but still no luck.I've been reading the mans(linux library)trying to see how to enter visudo in super user
but I'm missing the how to .I would like to set up the sudoer file as to be able to use sudo for most things.Now when I try to do /usr/sbin/visudo it tells me no file found,instead of permission denied.All help appreciated.

hmmsjan
8th August 2010, 07:15 AM
Dear Zych01,


Hi I'm back but still no luck.I've been reading the mans(linux library)trying to see how to enter visudo in super user
but I'm missing the how to .I would like to set up the sudoer file as to be able to use sudo for most things.Now when I try to do /usr/sbin/visudo it tells me no file found,instead of permission denied.All help appreciated.

Could you please give the exact error message.

If the /etc/sudoers is not there, it happily creates a new empty one, and if it happens that you somehow managed to install Fedora leaving the famous "vi" editor out, the message is "no editor found (editor path=/bin/vi)"

By the way, if you do not know the art of editing with "vi", you may end up in a screen showing the contents
of the file with no idea how to get out.
You can choose your favorite editor by typing before the visudo command e.g.:
"export EDITOR=/usr/bin/nano" or "export EDITOR=/usr/bin/gedit".


If you want to mimick Ubuntu, just enter in the sudoers file:

ALL ALL=(ALL) ALL

and every user can give any system command with "sudo" after giving his own password.

Good luck!

Asgard
8th August 2010, 09:39 AM
Dear All,

sudo is implemented in Fedora, but not used as standard like in Ubuntu.
You have to enter your name in the /etc/sudoers file, and better do
it with /usr/sbin/visudo, and not by directly editing the /etc/sudoers.

with a line in /etc/sudoers like:

username ALL=(ALL) ALL

the user "username" can give all commands in superuser mode, after entering the users password, not
the root password.

In that way it's possible to give the user access to some or all administration commands without
telling him the root password, as with "su"

Good luck
hi, I have the same problem as the author of the thread.
However, I can't get to editing it like you suggested. It merely says it cannot run the binary.

Zych01
8th August 2010, 02:46 PM
Hello! When I tried; export EDITOR=/usr/bin/nano ,I then put /ect/sudoer That's when I got, no such file or directory .
Then after eport EDITOR=/usr/bin/nano ,I then typed /usr/sbin/visudo I got permission denied

hmmsjan
8th August 2010, 03:25 PM
Dear Zych01,


Hello! When I tried; export EDITOR=/usr/bin/nano ,I then put /ect/sudoer That's when I got, no such file or directory .
Then after eport EDITOR=/usr/bin/nano ,I then typed /usr/sbin/visudo I got permission denied

The proper sequence is:
su -
export EDITOR=/usr/bin/nano
/usr/sbin/visudo

provided package nano is installed, otherwise you get a message about missing editor.
To install nano:
su -
yum install nano

Of course, you can use any editor, but nano is a simple text-only one.

May be I caused a bit of confusion: the file /etc/sudoers is not touched directly,
but is modified by /usr/sbin/visudo. It's a bit complicated......
So: try to get /usr/sbin/visudo running, enter the required lines in the file shown, and it should work...


Good luck!

Zych01
24th August 2010, 09:38 PM
Hello! Zych back.
Been working 12 hour shifts with over time,sorry it took so long to get back to here.

In sudoer file,at top says GNU nano 2.0.9 file:/ect/sudoers.tmp .scroll down to next comes main part, user MACHINE=COMMANDS the commands may have other options added to it
Allow root to run any command anywhere
Root ALL=(ALL) ALL
I thought in this folder is where I would type the ALL command but it is there. How do I active this command,where do I type
this command and insure it is activated.

hmmsjan
25th August 2010, 06:21 PM
Dear Zych01,


Hello! Zych back.
Been working 12 hour shifts with over time,sorry it took so long to get back to here.

In sudoer file,at top says GNU nano 2.0.9 file:/ect/sudoers.tmp .scroll down to next comes main part, user MACHINE=COMMANDS the commands may have other options added to it
Allow root to run any command anywhere
Root ALL=(ALL) ALL
I thought in this folder is where I would type the ALL command but it is there. How do I active this command,where do I type
this command and insure it is activated.

This line means that the root user is allowed to do everything, which is moreorless
superfluous because root is already allowed to do everything,
but it's your turn by adding below:

yourloginname ALL=(ALL) ALL

Remember: with sudo you need your own password, not root's one!

Good luck!