LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 01-20-2010, 02:34 AM   #1
Erhnam
Member
 
Registered: Jan 2005
Posts: 54

Rep: Reputation: 15
Debian Live, set custom user to variable


I'm trying to build my own livecd using the debian live project: http://debian-live.alioth.debian.org/

At the end (/usr/lib/finish-install.d) I want the installler to change some configuration files. The custom user selected during the installation I want to put into a variable;

Code:
#!/bin/sh
User=$(getent passwd 1000 | sed -e 's/\:.*//')
if [ "$User" != "user" ] ; then
 in-target sed -i "s/home\/user/home\/$User/g" /etc/smb.conf
 in-target sed -i "s/USER=user/USER=$User/g" /etc/default/sabnzbdplus
fi
The script seems to work fine becuase when I have a look at the configuration files the lines have been modified. However the $User was empty. Anyone of you have some knowledge about debian-live and know how to retrieve the custom user that was entered during the installation?

Last edited by Erhnam; 01-20-2010 at 02:35 AM.
 
Old 01-20-2010, 07:30 PM   #2
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
Mmmm

I never tried that...

I believe the default user ( username: user, password: live)
in Debian Live is created at bootup
I think it says it onscreen when booting...

I tried changing gdm stuff, etc and got nowhere
?

You can check out mine at
http://linux.softpedia.com/progMoreB...isX-31789.html

I think Xodus, Chrysalis, and watchman are Debian Live builds
the rest are Debian Live builds installed to HD, customized, and then I used remastersys
all include remastersys

The live builds I chrooted into after using live-helper to do
Code:
lh_config -d lenny -p standard-x11 -a i386
the lists are in /usr/share/live-helper/lists
you can make your own too

I recommend 503box-Chrome for remastersing
all have xnest, squashfs-tools, kpartx,etc
I usually couldnt get the xnest sessions working in lenny builds

so, being a "inquisitive-modifier"
I worked around it
I boot up in the live build I made off hd frugal like usb
setup the user account, bookmarks,etc, thems you know
make a root password and login to root desktop
confihure it
set up sudoers, services,etc

then I place everything in live-session /root folder
into the extracted build on hd (squashfs-root)
all users /home is usually populated by /etc/skel

place everything from /home/user/ in the extracted squashfs-root/etc/skel
then chown it to root to make sure

Code:
chown -R root:root etc/skel/*
get the hidden files too
Code:
chown -R root:root etc/skel/.*
note the . before the *

then mksquashfs it and boot

you wanna work together?
 
Old 01-20-2010, 07:42 PM   #3
linus72
LQ Guru
 
Registered: Jan 2009
Location: Gordonsville-AKA Mayberry-Virginia
Distribution: Slack14.2/Many
Posts: 5,573

Rep: Reputation: 470Reputation: 470Reputation: 470Reputation: 470Reputation: 470
I'm building a squeeze live now
look, puish the computer!
burn it down!
how much ram am i using?
the processors getting whacked or what?
LOL

thats toram debian live big
http://multidistro.com/deb/503new/punishtheram.png

Last edited by linus72; 01-20-2010 at 07:43 PM.
 
Old 01-21-2010, 01:38 AM   #4
Erhnam
Member
 
Registered: Jan 2005
Posts: 54

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by linus72 View Post
Mmmm

I never tried that...

I believe the default user ( username: user, password: live)
in Debian Live is created at bootup
I think it says it onscreen when booting...
No, I doesn't mean that. After the livecd has been created you should be able to use it. You can either directly boot from it or use the livecd to perform a system install. I'm talking about the last feature, the system install feature.

During the system installation the user will be prompted with an option to setup the first user. I want to catch this value!

I tried:

Code:
User=$(getent passwd 1000 | sed -e 's/\:.*//')
but also;

Code:
User=$(in-target getent passwd 1000 | sed -e 's/\:.*//')
If anyone knows how to do to this. Please let me know!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Cannot start vnc server because the USER environment variable is not set izac5 Linux - Newbie 4 11-21-2009 08:10 PM
I try to set a user defined variable but it understands a command albinworld Linux - Newbie 3 01-03-2009 01:42 PM
1:root vncserver: The USER environment variable is not set. Niceman2005 Linux - Software 1 05-24-2006 10:13 PM
How to set envirment variable when boot from live CD happy_maoron Linux From Scratch 3 11-01-2005 09:18 PM
Creating a custom Debian CD set oneguy Debian 2 01-19-2005 11:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration