Find the answer to your Linux question:
Results 1 to 5 of 5
I want to replace /bin/login with a different login program. In case the new login fails to work and will not let anybody login, how can I get access to ...
  1. #1
    Just Joined!
    Join Date
    Mar 2007
    Posts
    20

    Change /bin/login?

    I want to replace /bin/login with a different login program. In case the new login fails to work and will not let anybody login, how can I get access to the system and change the /bin/login back to the original one?

    I guess there are several options. One that I can think of might be to run sshd and open firewall for incoming ssh request. In case new "/bin/login" will not work, I can ssh into the system as a normal user from network and su as root and change original login back. But if key-based authentication is not set up (no key pairs are generated and placed in right places), will sshd call "/bin/login" for authentication by using "username" and "password"? Any thoughts and solutions?

    Thanks a lot!

  2. #2
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133
    When I do stuff like this that could prevent me from booting my computer and logging in to fix the problem, I always make sure I have a linux live CD kicking around. If you screw a file up and you cannot get to a point where you can fix the file, boot up live cd, mount your harddrive, and voila, you can get to your files to fix them.

    The ssh might also work, but I think that logging into an ssh server has a good chance it runs the same login script as when you login to your computer normally.

    The live cd will definitely work, but I'd get the opinion of an expert if you were planning on relying on ssh.
    Living the digital dream....
    Disclaimer: I may be wrong since I was once before.
    Breathe out so I can breathe you in ~~Everlong

  3. #3
    Just Joined!
    Join Date
    Mar 2007
    Posts
    20
    Quote Originally Posted by rudie_rage View Post
    The live cd will definitely work, but I'd get the opinion of an expert if you were planning on relying on ssh.
    Thanks!

    I'd also suspect that sshd will fall back to 'login' script when it uses username and password for authentication (otherwise, if key-based authentication is used, it will definitely be safe). So, I'd like to hear opinion or experience from experts.

    Anyway, back to your method, how to make a CD as you said? Hope it won't be too complicated to kill my patience

  4. #4
    Linux Newbie rudie_rage's Avatar
    Join Date
    Jun 2007
    Location
    Canada
    Posts
    133
    to make a live cd?

    well first you have to find a live cd ISO and then burn said ISO to a disk. I dont know which part you are asking about, so I'll assume both.

    the Ubuntu install cd (or most of them... I had one that didnt) doubles as a live cd. It will boot from the disk into a full desktop before it will let you install it. You can use that, but instead of installing it, just mount your harddrive and edit files.

    Knoppix is pretty famous for being a good live CD distro, although ive never used it.

    DSL (damn small linux) is what i would reccomend, because its a nice small download so you wont spend the better part of an evening getting a small recovery tool.

    As for burning the distribution to a disk, I suggest googling your favourite burning program + 'iso' . There are bound to be step by step instructions.

    Damn Small Linux, Download the ISO <-- DSL download site.50ish Mb, so it shouldnt take you long to download. Burn it to disk, pop it in the cd drive, reboot computer, let it load, and you should have a nice little desktop running off the disk. From there you can open a terminal, mount your hard drive, and do whatever you need.
    Living the digital dream....
    Disclaimer: I may be wrong since I was once before.
    Breathe out so I can breathe you in ~~Everlong

  5. #5
    Just Joined!
    Join Date
    Mar 2007
    Posts
    20

    Arrow

    Quote Originally Posted by rudie_rage View Post
    to make a live cd?

    Damn Small Linux, Download the ISO <-- DSL download site.50ish Mb, so it shouldnt take you long to download. Burn it to disk, pop it in the cd drive, reboot computer, let it load, and you should have a nice little desktop running off the disk. From there you can open a terminal, mount your hard drive, and do whatever you need.
    Thanks! A good tool. I will try it later.

    But I still want to hear some other experts advice on this.

Posting Permissions

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