-1

I changed the root password, using webmin it shows me successfully done.

$ uname -a
Linux .com 2.6.18-194.11.4.el5 #1 SMP Tue Sep 21 05:04:09 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

$ echo -e "newPassword\nnewPassword" | passwd root

now i am logged in via ssh and trying to sudo -s or sudo - it says Sorry, try again.

Why i cant sudo -s login as root with valid password? or sudo root commands?

EDIT:

> cat /etc/sudoers
/sbin/iwconfig, /sbin/mii-tool
Defaults    requiretty
Defaults    env_reset
Defaults    env_keep = "COLORS DISPLAY HOSTNAME HISTSIZE INPUTRC KDEDIR \
                        LS_COLORS MAIL PS1 PS2 QTDIR USERNAME \
                        LANG LC_ADDRESS LC_CTYPE LC_COLLATE LC_IDENTIFICATION \
                        LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC \
                        LC_PAPER LC_TELEPHONE LC_TIME LC_ALL LANGUAGE LINGUAS \
                        _XKB_CHARSET XAUTHORITY"
root    ALL=(ALL)   ALL
2

you suppose to enter the password of user that you are trying to sudo from and make sure user has proper sudo access in visudo (/etc/sudoers)

  • Using WebMin i am logged in as root, i changed the password, then i tried to ssh to the machine as another user, i am logged in, now via ssh trying to sudo - or sudo -s with new password for root but its failing. – YumYumYum Jun 19 '13 at 23:46
  • Please see EDIT the /etc/sudoers – YumYumYum Jun 19 '13 at 23:48
  • 1
    what if you try su - – Raza Jun 19 '13 at 23:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.