I would use useradd to create a new user with password automatically in knoppix.sh. For detailed information on useradd, please see the man page.
Any idea how to add a root and knoppix password automatically ?
(without user intervention)
It's to create semi-customized knoppix.
It should launch FTP server and SSH server automatically at boot.
But without setting the password for knoppix this doesn't work.
Anyone an idea ?
Greetzzzzz,
I would use useradd to create a new user with password automatically in knoppix.sh. For detailed information on useradd, please see the man page.
Answer resided in article 'Headless knoppix' (docs division)
the line :
does the trick.Code:echo "knoppix:$PASSWORD" | chpasswd
Nevertheless you must be in root.
Since you can't sudo this with knoppix user ,you'll have to work with inbetween script.
The reason I use sh xxxx.sh is that I can use then from a remote drive. (I don't have to chmod it - since I can't either )
How I pulled it off :
- launch KWrite (or other editor)
type here :
save it as setmyknoppix.shCode:echo "knoppix:testpassword" | chpasswd
- Now type in knoppix console :
Now the password for knoppix is set to testpasswordCode:sudo sh setmyknoppix.sh
This can also be applied for the root .
- launch KWrite (or other editor)
type here :
save it as setmyroot.shCode:echo "root:rootpassword" | chpasswd
- Now type in knoppix console :
et voilą ....Code:sudo sh setmyroot.sh
greetzzzz...
Sorry chaps, seems you can't get bold into code .
So here is the good one
Answer resided in article 'Headless knoppix' (docs division)
the line :
does the trick.Code:echo "knoppix:$PASSWORD" | chpasswd
Nevertheless you must be in root.
Since you can't sudo this with knoppix user ,you'll have to work with inbetween script.
The reason I use sh xxxx.sh is that I can use then from a remote drive. (I don't have to chmod it - since I can't either )
How I pulled it off :
- launch KWrite (or other editor)
type here :
save it as setmyknoppix.shCode:echo "knoppix:testpassword" | chpasswd
- Now type in knoppix console :
Now the password for knoppix is set to testpasswordCode:sudo sh setmyknoppix.sh
This can also be applied for the root .
- launch KWrite (or other editor)
type here :
save it as setmyroot.shCode:echo "root:rootpassword" | chpasswd
- Now type in knoppix console :
Now the password for root is set to rootpasswordCode:sudo sh setmyroot.sh
et voilą ....
greetzzzz...
Cisco SG300-52-Port Gigabit Managed Rack Mountable Network Switch
$44.95
ARUBA J9772A 2530-48G PoE+ 48 PORT ETHERNET SWITCH W/ RACK EARS J9772-60301
$140.23
Fortinet FortiSwitch FS-124D-POE 24 Port Gigabit Ethernet Switch UNREGISTERED
$99.97
HPE ARUBA 2530-24G J9773A PoE+ 24-PORT GIGABIT ETHERNET SWITCH J9773-60201
$98.15
NETGEAR GS305300PAS 5 Port Gigabit Ethernet Unmanaged Switch
$15.99
NETGEAR GS305Pv2 5-Port Gigabit Ethernet Unmanaged SOHO Switch W/PoE+
$19.99
TP-Link TL-SG108PE 8-port Gigabit Easy Smart PoE+ Swith w/ 4-port PoE - Sealed
$49.50
TRENDnet TEG-S762, 6-Port 10G Switch
$139.99
TRENDnet TEG-S17D 16-Port Gigabit Unmanaged Network Switch
$50.00
HP JG937A Flexnetwork 5130-48G PoE+ 48-Port Gigabit Network Switch
$56.99