-
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
Fanxiang 4TB 2TB 1TB SSD 550MB/s 2.5'' SATA III Internal Solid State Drive lot
$219.99
Fanxiang 4TB 2TB 1TB SSD 2.5'' SATA III 560MB/s Internal Solid State Drive lot
$188.09
Fanxiang SSD 4TB 2TB 1TB PS5 SSD M.2 NVME SSD 7300MBS PCIe 4.0 Solid State Drive
$269.99
Fanxiang M.2 SATA SSD 2TB 1TB 512GB 256GB SSD Internal M2 Solid State Drive Lot
$109.99
Patriot P210 128GB 256GB 512GB 1TB 2TB 2.5" SATA 3 6GB/s Internal SSD PC/MAC Lot
$15.50
1080PRO 4TB SSD Solid State Hard Drive Ngff M.2 SSD Gaming Internal Hard Disk
$32.99
SAMSUNG 870 EVO 500GB 2.5" SATA SSD HARD DRIVE MZ-77E500 (99% Health)
$39.00
120 128GB SSD SATA III 2.5" 7mm Solid State Drive MIXED BRAND APPLE LAPTOP zzz-
$9.99
Netac 1TB 2TB 512GB Internal SSD 2.5'' SATA III 6Gb/s Solid State Drive lot
$119.99
Netac 2TB 1TB 512GB 240GB Internal SSD 2.5'' SATAIII 6Gb/s Solid State Drive lot
$118.99