Find the answer to your Linux question:
Results 1 to 6 of 6
Hi, I have one linux machine on which i want to delete the root password. My aim is to issue some commands(mostly which require root priviledge) from remote machines and ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! amit4g's Avatar
    Join Date
    Feb 2007
    Location
    Bangalore,India
    Posts
    63

    Remove root password


    Hi,

    I have one linux machine on which i want to delete the root password.
    My aim is to issue some commands(mostly which require root priviledge) from remote machines and for which i'm thinking of issuing rsh(not the kerberos rsh) from remote machines.
    i.e.
    [user@remote] /usr/bin/rsh <target machine> -l root <some command>

    To achieve the same, i did:
    [root@target] passwd -d root
    [root@target] service sshd restart

    After this i checked the /etc/shadow file on <target machine> and it
    entry was removed, but still the target machine prompts for password
    and as i've already deleted the password, hence even if i provide the
    correct last password, it doesn't work ;(

    [user@remote] /usr/bin/rsh <target machine> -l root "/usr/bin/date"
    root@<target>'s password:
    Permission denied, please try again.

    what am i missing.
    i know i can setup password less ssh, but why *this* not working.
    i remember being able to do this on HP-UX 11iV3 Successfully, only instead
    of 'rsh', i had 'remsh'

    ~amit

  2. #2
    Just Joined! geniuz's Avatar
    Join Date
    Mar 2008
    Location
    Netherlands, Europe
    Posts
    71
    I think it REALLY isn't smart removing your root password, I don't even think it's easily possible in linux. Think about it, your server would be an open door to hackers --.--'

  3. #3
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    Are you using ssh keys? If they were generated with passwords that could be the issue. EDIT - Oops I see you are using rsh rather than ssh.

    I would like to second what geniuz has said - this is a really bad idea. Especially because you are using rsh which is insecure in itself. I would think the inconvenience far outweighs having a wide open server waiting to be rooted. Would you consider using sudo with a regular user, and instead encrypt roots password so no one has it?

  4. #4
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    I would install ssh and setup dsa key pairs as suggested. Then you can login without a passwods securely as long as you have the public part of the key on the remote places (you can carry it on an usb stick, a floppy or whatever).

    If you run an rsh open to the world without a passwords, you are screwed. Lots of bots roam the internet and are continuously trying for logins on remote machines, and they would hit you in no time.

  5. #5
    Linux Newbie SagaciousKJB's Avatar
    Join Date
    Aug 2007
    Location
    Yakima, WA
    Posts
    162
    Well, if you really want a passwordless root account, I'm pretty sure that if you edit the /etc/passwd file in the following way it will allow you to just hit enter at the password prompt and succeed with a login.

    Code:
    root:x:0:0...
    Where "x" ( or whatever it may be ) is, simply delete it and leave it blank. In all my experiences, this has enabled me to login locally without a pass, but I've never tested it remotely.


    Now, aside from this, there's another issue. If you're trying to avoid the prompt for the password, I don't believe there is anyway to do that at all. You can manage it with ssh by using keys and disabling password authentication like others have mentioned.

  6. #6
    Linux Guru
    Join Date
    Nov 2007
    Location
    Córdoba (Spain)
    Posts
    1,513
    Quote Originally Posted by SagaciousKJB View Post
    Now, aside from this, there's another issue. If you're trying to avoid the prompt for the password, I don't believe there is anyway to do that at all. You can manage it with ssh by using keys and disabling password authentication like others have mentioned.
    You can if you are brave enough.

    Most graphical login managers will allow you to auto-login. You can do so in the console as well, there are many approaches. A famous one is using mingetty instead of agetty.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •