When I try to edit my sources.list file using the command:
$ gksu gedit /etc/apt/sources.list
It requests an administrative password and when I type the password, It says incorrect and try again.What to do? I am new to Linux and Ubuntu.
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
Use the terminal text editor program nano instead of gedit to edit
/etc/apt/sources.list. Open the terminal and type:
sudo nano /etc/apt/sources.list
The instructions for using nano are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.
You can also use the terminal program vim to edit text files, but nano is easier to use.
gksu is probably set to use
su instead of
sudo as the authentication method. Therefore, it's asking you for the administrative (root) password.
To change this, run
gksu-properties and choose
sudo as the Authentication Method. This way,
gksu will ask you for your password.
You'll notice that the dialog box that asks you for the password changes from:
which is asking for the administrative (root) password to:
which asks for your password to perform administrative tasks.