Results 1 to 4 of 4

Thread: adding a user w/ password and saving it to configs.tbz

  1. #1
    Member registered user
    Join Date
    Sep 2004
    Posts
    34

    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?

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Location
    Germany
    Posts
    1,159
    You could write a knoppix.sh script that adds the user on the fly with

    Code:
    useradd myusername
    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

  3. #3
    Member registered user
    Join Date
    Sep 2004
    Posts
    34
    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!

  4. #4
    Junior Member
    Join Date
    Oct 2004
    Posts
    6
    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

  1. Adding user log in
    By Mustang64 in forum General Support
    Replies: 3
    Last Post: 05-10-2004, 07:14 PM
  2. Adding a root password to a remasterd ISO
    By manuka in forum Customising & Remastering
    Replies: 1
    Last Post: 03-15-2004, 06:57 AM
  3. Make new user with same configs as current user?
    By SunnyB in forum General Support
    Replies: 4
    Last Post: 03-09-2004, 02:02 PM
  4. New user saving configuration
    By TomF in forum General Support
    Replies: 0
    Last Post: 09-12-2003, 12:10 AM
  5. root password and saving config to floppy
    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
  •  


IBM System X3850-X5 Server w/4x Intel  Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD picture

IBM System X3850-X5 Server w/4x Intel Xeon E7-4870 CPU , 512 GB DDR3 RAM,NO HDD

$1599.99



Unused IBM 09P0037 MAINBOARD For  RS/6000 7044-170 P-Series picture

Unused IBM 09P0037 MAINBOARD For RS/6000 7044-170 P-Series

$375.00



IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU picture

IBM 7915 AC1 M4 E27R704 Server Intel 2650V2 32GB RAM NO HDD w/ 2x 750w PSU

$225.00



IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5

IBM QRadar xx29 2x Xeon E5-2650v4 2x 900W PSU M5120 12x 3.5" Bay Server No RAM

$179.99



IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU picture

IBM Power 8 S822L Server 8247-22L POWER8 Enterprise 256GB RAM 2x 00KV626 CPU

$999.99



IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES picture

IBM SYSTEM X3500 M3 SERVER 7380AC1 TOWER Server XEON E5620 8GB RAID SEE NOTES

$110.30



IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1) picture

IBM System x3550 M3 1U Server 2x Xeon E5645, 192GB RAM, 2x 300GB HDD (7944-AC1)

$150.00



1 X IBM 720 POWER SERVER WITH 32 GB RAM picture

1 X IBM 720 POWER SERVER WITH 32 GB RAM

$344.97



IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon  E5620 picture

IBM ADP Server Type 7870 AC1 NO HDD | 128GB RAM PC3L | 2 x Xeon E5620

$199.99



IBM EMC 091-000-091 17 Inch Rackmount LCD Keyboard KVM Console 03N7012 picture

IBM EMC 091-000-091 17 Inch Rackmount LCD Keyboard KVM Console 03N7012

$109.99