-
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?
-
Senior Member
registered user
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 "*"
-
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).
-
Senior Member
registered user
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 '.

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).
-
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?
-
Senior Member
registered user
--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.

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?
-
--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'?
-
Senior Member
registered user
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. 

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
-
By Student in forum Hdd Install / Debian / Apt
Replies: 5
Last Post: 04-07-2007, 07:44 AM
-
By RJ17 in forum Customising & Remastering
Replies: 1
Last Post: 02-15-2007, 08:08 PM
-
By jeremiah in forum MS Windows & New to Linux
Replies: 0
Last Post: 03-28-2006, 06:04 AM
-
By Mikkey in forum Customising & Remastering
Replies: 8
Last Post: 10-11-2004, 09:57 PM
-
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
-
Forum Rules

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX
$59.99

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
$54.99

ASUS PRIME Z890-P WIFI Z890 LGA 1851 ATX motherboard, Intel® Core⢠Ultra Series
$235.99

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
$71.49

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
$34.99

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
$351.99