Root User Access Solution on putty

Root User Access Permission denied :(

Solution is here Don't worry :) 

As I have also faced the same issue while I was also trying to install on my VM, could not able to access my Root user access.
So I have decided that the proper solution must be share to all of you.

You are facing like this:- 
login as: root
root@192.168.30.131's password:
Access denied
root@192.168.30.131's password:
login as: user
user@192.168.30.131's password:
Welcome to Ubuntu 14.04 LTS (GNU/Linux 3.13.0-24-generic i686)

 * Documentation:  https://help.ubuntu.com/

Last login: Mon May  2 14:03:30 2016 from 192.168.30.1
user@ubuntuvm:~$ /etc/ssh/sshd_config
-bash: /etc/ssh/sshd_config: Permission denied
Solution 1 :-

type on VM terminal

vim /etc/ssh/sshd_config

Using Sudo for Super User Access to Root Privileges in Linux
The Linux super user, or root user, is a special user that has tremendous power, with the ability to access and modify all files on the operating system. This is necessary at times, but there is a potential for accidental errors to cause a great deal of destruction, so you have to be careful. (Like Spiderman says, with great power comes great responsibility.) Fot the times when the super user’s power is necessary, we’ll look at safer ways to be the super user on your Linux dedicated server.

Super User and Sudo

A really important feature of Linux is privileges. It’s part of the security, and controls which users can access, manipulate or even be aware of what files. Logged in with the user account we’ve created will allow safe usage of the operating system, but there are times when the privileges of the root, or super user are required.

There are two ways to access super user privileges. The first is with the su command.

$ su –

If you enter this command, and note the hyphen, then you will be prompted for the root user’s password. Enter it correctly, and you will be logged in as the super user. You can then perform what tasks you need to, but with care! When you’ve finished, log out immediately using the exit command.

The second way to get super user privileges is to use sudo. This is a method by which a regular user can gain a temporary privilege boost. It takes a little setting up, but once done it is probably safer than the su command method.

First, log in to your server. Then, log in as root using the su command. Then, enter the following.

$ visudo

This will open up a text file that contains information for sudo. A little way down the file you’ll see the following text.

# User privilege specification

root ALL=(ALL) ALL

You need to add yourself to the file in order to get your privileges. To do this, you need to do a little editing. Use the arrow keys to move the cursor to this line, then press i on the keyboard. You’re now editing the file, so enter the following line:

YourUserName ALL=(ALL) ALL

Of course substitute your user name for YourUserName, then press escape, and type ZZ (capital Z twice). This will save the file, and that’s it. If you’ve done it right, you can now use sudo. To test this, log out as the root user (type exit, hit return), then try the following.

$ ls /root

You should receive an error message telling you that permission is denied. So, try it with sudo.

$ sudo ls /root

Now you will be asked for a password. Enter your own password at this point (not the root password) and hey presto, you’ll be presented with a listing of the root user’s directory. So, any time that you wish to do something that requires root user privileges, remember that you can use the sudo command, saving you from logging in as the root user.

Logging out

To log out of your ssh session, and so your server, at any time, type:

$ exit

*************************** So go here **************************

user@ubuntuvm:/etc/ssh$ vi sshd_config

Change this 

# Authentication:
LoginGraceTime 120
PermitRootLogin without-password
StrictModes yes

to this :-  permitRootLogin :- yes


Solution 2 :-
Go to on putty :-

username - root
password - password

sudo passwd root
password password

This enables manual login when m/c boots

sudo sh -c 'echo "greeter-show-manual-login=true" /etc/lightdm/lightdm.conf'

Done ::---> :D :) Now you will be able to access root user on your putty software and able to connect the VM . 



Comments

Popular posts from this blog

DeprecatedProperties for Apache Hadoop 3.0.0-alpha4