Package Search
 
Members: 353 | Topics: 767 | Posts: 3211
We welcome our newest member: ClintBarton
Info
» You aren't logged in, login or registerOnline: No members and 25 guests | Time: 21:45
-bash-3.2$ instead my@my$
paldo Support Forum    Upkg    General Discussion
Reply Reply   Subscribe Topic Subscribe Topic
14 posts found.Page: 1 2
 -bash-3.2$ instead my@my$
Junior Mitglied
 
 
 
Posts: 22
Registered: 2007-05-08
when i open terminal like user in console, today appear "-bash-3.2$" in the bar, instead "jeshot@virgin$"
anybody could explain me it?

thanks
Profile   Private Message
Created: 2007-06-08 05:21
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Administrator
 
 
 
Posts: 426
Registered: 2004-09-09
That looks like you've deleted/modified /home/jeshot/.bashrc - or you've not used useradd -m to create your home directory.

You can fix that with:

Code[In neuem Fenster öffnen]
cp /etc/skel/.bashrc ~
Profile   Private Message   Web
Created: 2007-06-08 06:45
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Junior Mitglied
 
 
 
Posts: 22
Registered: 2007-05-08
humm strange, i create this user from first installation, and no problem. could be modificated after an upgrade?
Profile   Private Message
Created: 2007-06-08 17:02
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Administrator
 
 
 
Posts: 426
Registered: 2004-09-09
No, upgrades don't modify files in the home directory.
Profile   Private Message   Web
Created: 2007-06-08 17:09
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Junior Mitglied
 
 
 
Posts: 22
Registered: 2007-05-08
really i dont delete or modify anything :s, or any oh that.

i make

Code[In neuem Fenster öffnen]
cp /etc/skel/.bashrc ~


but continues my user bash like

Code[In neuem Fenster öffnen]
-bash-3.2$ 


any other suggerence?
Profile   Private Message
Created: 2007-06-08 19:32 | Modified: 2007-06-10 03:32 by delta!
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
This is the content of the file in 64bit located in the homedir:

Code[In neuem Fenster öffnen]
if [ -f "/etc/bashrc" ] ; then
. /etc/bashrc
fi


# This line was appended by KDE
# Make sure our customised gtkrc file is loaded.
export GTK2_RC_FILES=$HOME/.gtkrc-2.0


but still -bash-3.2$
Profile   Private Message   E-Mail
Created: 2007-06-10 12:11
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Junior Mitglied
 
 
 
Posts: 22
Registered: 2007-05-08
juergbi give me solution in irc

Code[In neuem Fenster öffnen]
cp /etc/skel/.bash_profile ~


"...as we set the prompt from bashrc instead of /etc/profile now.."

thanks !
Profile   Private Message
Created: 2007-06-12 17:37
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
To fix this do this:

Code[In neuem Fenster öffnen]
cp /etc/skel/.bashrc ~
cp /etc/skel/.bash_profile ~


When does this been fixed, Juerg? It is cos of aufs. /etc/skel don't work anymore ...

Code[In neuem Fenster öffnen]
cp -a /etc/skel/.bash* ~
should fix it.

Code[In neuem Fenster öffnen]
<!-- create livecd user paldo and let it autologin -->
<cmd>cp -a $CHROOTDIR/etc/skel $CHROOTDIR/home/paldo</cmd>
<cmd>cp -a $CHROOTDIR/etc/skel/.bash* $CHROOTDIR/home/paldo</cmd>
Profile   Private Message   E-Mail
Created: 2007-06-23 03:32 | Modified: 2007-06-23 03:58 by Amnon82
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Administrator
 
 
 
Posts: 426
Registered: 2004-09-09
aufs is not the issue. The problem is that the script on your installer CD doesn't use useradd -m to create the home directory of the new user; it creates the directory manually and doesn't copy the contents of /etc/skel to the new home directory.
Profile   Private Message   Web
Created: 2007-06-23 08:26
Highlight selected Text   Edit   Delete   Quote Reply
 Re: -bash-3.2$ instead my@my$
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
I almost used the same way as you:

Code[In neuem Fenster öffnen]
<!-- create livecd user paldo and let it autologin -->
<cmd>cp -a $CHROOTDIR/etc/skel $CHROOTDIR/home/paldo</cmd>
cmd>chown -R 1000:1000 $CHROOTDIR/home/paldo</cmd>
<cmd>echo "paldo:x:1000:1000::/home/paldo:/bin/bash" &gt;&gt; $CHROOTDIR/etc/passwd</cmd>
<cmd>echo "paldo:x:1000:" &gt;&gt; $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^wheel:.*/wheel:x:18:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^audio:.*/audio:x:6:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^video:.*/video:x:22:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^cdrom:.*/cdrom:x:25:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^disk:.*/disk:x:17:paldo/' $CHROOTDIR/etc/group</cmd><!-- add to disk group to allow gparted to run -->
<cmd>sed -i -e 's/^network:.*/network:x:23:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>echo "paldo:paldo" | chroot $CHROOTDIR chpasswd --md5</cmd>


Code[In neuem Fenster öffnen]
#!/bin/bash
# expects <%username%> as $1 , <%userpw%> as $2 and <%TargetPart%> as $3
mkdir -p /root/mnt/$3/home/$1
# copy paldo-chat to desktop
mkdir -p /root/mnt/$3/home/$1/Desktop
cp -a /root/mnt/$3/usr/share/applications/paldo-chat.desktop /root/mnt/$3/home/$1/Desktop
chown -R 1000:1000 /root/mnt/$3/home/$1
echo "$1:x:1000:1000::/home/$1:/bin/bash" >> /root/mnt/$3/etc/passwd
echo "$1:x:1000:" >> /root/mnt/$3/etc/group
sed -i -e 's/^wheel:.*/wheel:x:18:'$1'/' /root/mnt/$3/etc/group
sed -i -e 's/^audio:.*/audio:x:6:'$1'/' /root/mnt/$3/etc/group
sed -i -e 's/^cdrom:.*/cdrom:x:25:'$1'/' /root/mnt/$3/etc/group
echo "$1:$2" | chroot /root/mnt/$3 chpasswd --md5


And I can add this:

Code[In neuem Fenster öffnen]
# copy bash settings
cp -a /root/mnt/$3/etc/skel /root/mnt/$3/home/$1
cp -a /root/mnt/$3/etc/skel/.bash* /root/mnt/$3/home/$1


user-add -m $1 won't work, cos I want to create the user not on the livecd. It should be created on the hdd, so I have to do it manual.

btw:

cp -a $CHROOTDIR/etc/skel $CHROOTDIR/home/paldo

creates a folder skel in the homedir with the content in it but don't copy the content to the homedir. How do we fix that.
Profile   Private Message   E-Mail
Created: 2007-06-23 08:37 | Modified: 2007-06-23 08:56 by Amnon82
Highlight selected Text   Edit   Delete   Quote Reply
This topic contains further posts. Next
Page: 1 2
Subscribe Topic Subscribe Topic
powered by bitron board 1.23a