Results 1 to 8 of 8

Thread: Root shell

  1. #1
    Junior Member
    Join Date
    May 2006
    Posts
    5

    Root shell

    What is this script that allows knoppix not to have a root password?

    Could it be implanted into installed linux versions, like Suse or something?

  2. #2
    Senior Member registered user
    Join Date
    Apr 2005
    Location
    italy
    Posts
    245
    I guess that isn't the case to talk about 'scripts'.
    Passwords are usually stored in the /etc/shadow file. This file has many lines how many accounts there are, every line has many fields delimited by columns ":". Passwords (encrypted) normally are stored in the second field, while if the password isn't setted an asterisks appears:
    Examples of root fields in /etc/shadow:
    root:*:13278:0:99999:7::: -->knoppix
    root:$1$7bEBaK/w$nYdrrhuEbW1KKVkX2GY0Y.:13278:0:99999:7::: -->password enabled

    So if you want to have a root account without password just edit this file and replace the encrypted password with an "*"

  3. #3
    Junior Member
    Join Date
    May 2006
    Posts
    5
    Thanks for your answer.

    And if there is no password, as in 'NOT EMPTY', there is no way you could ever connect to the machine, right?
    You'd have to set the root password in order to connect to the machine from the outside world, right?

    'Empty' as in just hitting 'return' (enter).

  4. #4
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041
    See ' man passwd '

    " /etc/passwd " is the 1st file; " /etc/passwd- " is somehow related
    " /etc/shadow " is the secure password file

    " /etc/group " is also related, along with its " /etc/group- " file (I dunno if it's a backup, or what.)

    --Best practices involve editing " /etc/ssh/sshd_config " to NOT allow root login directly; NOT run telnet *at all*; and NOT allowing root to login as an FTP user. ( See " /etc/ftpusers " )

    BEGIN /etc/ftpusers
    Code:
    # /etc/ftpusers: list of users disallowed FTP access. See ftpusers(5).
    
    root
    daemon
    bin
    sys
    sync
    games
    man
    lp
    mail
    news
    uucp
    nobody
    sshd_config line:
    " PermitRootLogin no " (w/o the quotes) ++ bounce ssh: ' /etc/init.d/ssh restart '

    --Check knoppix " /etc/inittab " on the livecd to see what it's doing at startup.

    --Also check ' ps 1 ' to see the default runlevel, then (for example runlevel 5: )
    ' /bin/ls /etc/rc5.d ' == These files run when runlevel 5 is called. S?? means Start, K?? means Kill.

    --Things in " /etc/rcS.d " run in Single user mode, and also are called before the numeric runlevels; i.e. they run regardless.

    See ' man init '.

    Quote Originally Posted by knoppix00
    Thanks for your answer.

    And if there is no password, as in 'NOT EMPTY', there is no way you could ever connect to the machine, right?
    You'd have to set the root password in order to connect to the machine from the outside world, right?

    'Empty' as in just hitting 'return' (enter).

  5. #5
    Junior Member
    Join Date
    May 2006
    Posts
    5
    Thanks, but what I ment was that when you run knoppix without any additional settings at the start.
    That there is no password so you wouldn't be able to connect to the machine from the outside world, i.e. the internet, correct?

  6. #6
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041
    --Not necessarily. Try running ' nmap localhost ' on a default Knoppix boot, and see what's running.

    --If ssh or other services such as email are running at boot, someone *could* possibly hack the box. Best bet is to run behind a firewall, and not "assume" it's secure out of the box.

    --You can always ' passwd root ' and ' passwd knoppix ' and set them to a long, difficult string - such as the first letters of every word in a sentence.
    "ycaprapkasttaldssatfloewias" == ^

    --Anyhow, you asked if that capability could be ported to other distros; and you need to know the things I listed in order to do that.

    Quote Originally Posted by knoppix00
    Thanks, but what I ment was that when you run knoppix without any additional settings at the start.
    That there is no password so you wouldn't be able to connect to the machine from the outside world, i.e. the internet, correct?

  7. #7
    Junior Member
    Join Date
    May 2006
    Posts
    5
    --Anyhow, you asked if that capability could be ported to other distros; and you need to know the things I listed in order to do that.
    Yea yea, thanks a million times .

    Since there is a password, you of course would always be able to hack into the machine, but if there isn't, how would you log into the machine as root...? You know.

    Of course, no services are running. But supposedly, I had 'ssh' running without a root password, would it be possible to hack into it using 'root'?

  8. #8
    Senior Member registered user
    Join Date
    Nov 2002
    Location
    USA, IL
    Posts
    1,041
    Reread my previous post regarding "best bet."

    My suggestion is to try it, and see if *you* can hack the box while it's running under the conditions you describe. You can't expect non-paid volunteers to do all your research for you.

    Quote Originally Posted by knoppix00
    --Anyhow, you asked if that capability could be ported to other distros; and you need to know the things I listed in order to do that.
    Yea yea, thanks a million times .

    Since there is a password, you of course would always be able to hack into the machine, but if there isn't, how would you log into the machine as root...? You know.

    Of course, no services are running. But supposedly, I had 'ssh' running without a root password, would it be possible to hack into it using 'root'?

Similar Threads

  1. SU Returned with ERROR in Root Shell
    By Student in forum Hdd Install / Debian / Apt
    Replies: 5
    Last Post: 04-07-2007, 07:44 AM
  2. Root Shell Disable
    By RJ17 in forum Customising & Remastering
    Replies: 1
    Last Post: 02-15-2007, 08:08 PM
  3. Root Shell
    By jeremiah in forum MS Windows & New to Linux
    Replies: 0
    Last Post: 03-28-2006, 06:04 AM
  4. lock root shell
    By Mikkey in forum Customising & Remastering
    Replies: 8
    Last Post: 10-11-2004, 09:57 PM
  5. root-shell doesn“t open ??
    By fritschi in forum General Support
    Replies: 1
    Last Post: 08-06-2003, 02:30 PM

Posting Permissions

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


GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX picture

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX

$59.99



GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5 picture

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5

$189.99



Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery picture

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery

$54.99



ASUS PRIME Z890-P WIFI Z890 LGA 1851 ATX motherboard, IntelĀ® Coreā„¢ Ultra Series picture

ASUS PRIME Z890-P WIFI Z890 LGA 1851 ATX motherboard, IntelĀ® Coreā„¢ Ultra Series

$235.99



GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard picture

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard

$59.99



MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P picture

MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P

$71.49



Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4 picture

Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4

$79.99



ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio picture

ASUS PRIME B360M-C MicroATX Intel LGA1151 DDR4 HDMI VGA USB RJ-45 Audio

$34.99



ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield picture

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield

$84.99



ASRock IMB-X1314 LGA 1700 Intel W680 DDR4 Quad display Micro-ATX Motherboard picture

ASRock IMB-X1314 LGA 1700 Intel W680 DDR4 Quad display Micro-ATX Motherboard

$351.99