Enable Root Access To Your New Ubuntu Server

There are 6 replies in this Thread which was already clicked 4,453 times. The last Post () by njunwa1.

    • Official Post

    This is for those who have setup their new Ubuntu server & find that they cannot login as root with programs such as putty & winscp. This will remove the need for the sudo-i command and allow you to run these programs as easily as they do on Debian ect.


    To enable root access type the following commands

    Code
    sudo -i


    Code
    sudo passwd root


    And this if you want to disable root access again use this.


    Code
    sudo passwd -dl root



    #######Update#########


    Newer versions of ubuntu may require these commands:


    Code
    sudo passwd -u root


    Code
    sudo passwd root


    Code
    su


    Code
    service ssh restart


    Code
    nano /etc/ssh/sshd_config


    edit line 28 from...
    PermitRootLogin without-password
    to
    PermitRootLogin yes
    Save changes and exit...Then restart SSH...


    Code
    service ssh restart


    Quote


    If you want to save the changes you've made, press Ctrl + O . To exit nano, type Ctrl + X . If you ask nano to exit from a modified file, it will ask you if you want to save it. Just press Y


    The attached sshd_config has already been edited...


    #######Update For 16.04.X and Latest Releases#########



    Code
    sudo passwd -u root


    Code
    sudo passwd root


    Code
    sudo -i


    Code
    sed -i 's/prohibit-password/yes/' /etc/ssh/sshd_config


    Code
    reboot

  • I have root access enabled and password updated. I guess that I now will be able to edit the file. Let you know how it goes.
    Thanks again.


    Update.
    Managed to get to the file and edit it (I think) with " vi /server/cccam/backup.old/ .
    I then pressed Esc and enter, followed by w to write changes. Now when I ftp into the location I see a new file called backup.old.swp. The original file backup.old is still there also. Do I have to overwrite the original with the swp file or am I way off the mark.

  • Hi I update to Ubuntu server to 14.4 and it want let me connect with putty and with WinSCP ! I do the commands > sudo -i > sudo passwd root ,change passwd than sudo reboot ,when I try to connect to root from other PC it want let me !! any Help please ? Thanks

  • Ok now I find out what I was doing wrong !!when upload from Ubuntu 12.00 to Ubuntu 14.04 ask me " do you want t delete password from root ?" with mistake I chose Yes !!! sorry It was my fault !!!

  • master G

    Added the Label Article

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!