-
adding a user w/ password and saving it to configs.tbz
For my project I need each cd to have an individual username...but with the following conditions...
1. username must have root home, uid, gid and individual password.
2. the passwd and shadow must be saved in the configs.tbz to avoid remastering the entire clopp and just the final iso.
What I tried so far is opening the passwd and shadow files...copy the root entries and changed the login info to a username...leaving the rest is...and copy the /etc/passwd and /etc/shadow into my configs.tbz file so it would overwrite when it boots up...
what I get on next boot is a failure stating an error with root.root not being found or something to that effect...
I'm assuming it has something to do with the boot script knoppix has with setting filenames with the right permissions and such...
I can build a script that will just echo in the info after boot from rc but i wanted to see if anyone else has had any success in this...or am i the ONLY one that requires a username with root credentials?
-
Senior Member
registered user
You could write a knoppix.sh script that adds the user on the fly with
Replace myusername with what you want them to be. Of course you must also change the xsession script, you could do that with search and replace.
Then you can set the password with expect,
http://www.clug.de/vortraege/expect/expect.html
probono
-
although a bit more complex i got exactly what i wanted by creating this script and running it in every runlevel...
Code:
start)
OFFSET=`ntpdate -q 192.5.41.41 | tail -n1 | cut -f4 -d':' | cut -f7 -d' ' | cut -f1 -d'.'`
TRUEDATE=$(($OFFSET / 86400))
date --set="$TRUEDATE days" > /dev/null
USREPOCHEXPIRE=$((`head -n1 /root/.user` + 150))
## .user is created when user request is submitted...basically its EPOCHDATE=$((`date +%s` / 86400)) > /root/.user
USRNME=`grep -v '$1' /root/.user | tail -n1`
PW=`grep '$1' /root/.user | tail -n1`
echo $USRNME:x:0:0:$USRNME,,,:/root:$RL >> /etc/passwd
echo $USRNME:$PW::::::$USREPOCHEXPIRE: >> /etc/shadow
exit 1
;;
thank you for your input though!
-
hi, this may be a off the topic considering the present context. but this is what i am trying for days and couldn't find a solution.
could pronobo or some one answer me this question. how do i boot a different user other knoppix , or is it possible to change the user knoppix to other one.
please help.
Similar Threads
-
By Mustang64 in forum General Support
Replies: 3
Last Post: 05-10-2004, 07:14 PM
-
By manuka in forum Customising & Remastering
Replies: 1
Last Post: 03-15-2004, 06:57 AM
-
By SunnyB in forum General Support
Replies: 4
Last Post: 03-09-2004, 02:02 PM
-
By TomF in forum General Support
Replies: 0
Last Post: 09-12-2003, 12:10 AM
-
By jmsuthar in forum General Support
Replies: 3
Last Post: 08-27-2003, 03:18 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

Vintage Commodore 128 -Tested-As Is No Cables, console only -READ DESCRIPTION
$165.00

BitBinders 1581DV Dual 3.5" Floppy Disk Drive for Commodore 8-Bit Computers READ
$429.00

1980's Commodore VIC - 20 Computer with Original Box and Manuals POWERS ON
$99.95

Pi1541 Zero with Epyx Fastload Hat, Case & 16gb SD for Commodore 64 and 128
$79.99

Commodore SX-64 Personal Computer
$600.00

Commodore 64 Serial Cable 6PIN DIN 1541 1571 C64 128 C128 Disk Drive Printer USA
$10.49

Commodore 1541 Emulator PI1541 HAT with ROTARY, OLED screen, USA Seller
$29.99

SOLD AS IS Lot of 5.25" Floppy Disks w/ Games & Software? Commodore 64 Atari 800
$59.99

TeensyROM+ TR+ v0.4 Cartridge for C64/128 - w/ Case & 32GB SD Preloaded
$89.50

Commodore OS USB | Bootable LIVE + Install | The Ultimate Gaming Linux OS | NEW
$11.99