Results 1 to 2 of 2

Thread: Bash customization

  1. #1

    Bash customization

    i have customized my bash profile thing, so it looks like I want it to.

    All except for when i change users, it goes back to bash-2.05b$.

    I saved it to /etc/profile so it starts out with the prompt i like every time, but How do i make it so it goes to if i were to start bash from another shell, or su to another user?

    the other thing it does to me is, when a shell starts, it pukes out a bunch of stuff like:
    Code:
    declare -x SHELL="/bin/bash"
    declare -x SHLVL="1"
    declare -x TERM="xterm"
    declare -x USER="nick"
    declare -x XINITRC="/etc/X11/xinit/xinitrc"
    for those of you who want to see what i have it looking like, you can check out http://206.146.80.74/img/bash.jpg

  2. #2

    Re:Bash customization

    i set something similar up in my /etc/profile
    Code:
    if [ ! "`id -u`" = "0" ]; then
     . ~/.bash.profile
    fi
    and then i put this in /usr/sbin/useradd, with a defualt .bash.profile being in /etc

    where it says this:
    Code:
    HME="-d ${HME}"
    add this:
    Code:
    PHME="${HME}"
    after it says this:
    Code:
    # Add the account to the system
    CMD="$useradd "$HME" -m "$EXP" "$U_ID" "$GID" "$AGID" "$SHL" "$LOGIN""
    $CMD
    addthis:
    Code:
    #Let's load a default profile
    cp /etc/.bash.profile $PHME/
    chown $PHME/.bash.profile $LOGIN
    chmod +rwx $PHME/.bash.profile
    I'm sure there's a quicker way to do this, but as long as it works...

Similar Threads

  1. bash question
    By shagnthings in forum Linux - General Topics
    Replies: 4
    Last Post: 02-13-2004, 02:44 AM
  2. C++/bash Question
    By Schotty in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 11-06-2002, 12:03 AM
  3. sh vs bash.. what is different?
    By morphman in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 06-11-2002, 06:26 PM
  4. Bash Pet - 2nd part
    By civ1492 in forum Linux - General Topics
    Replies: 2
    Last Post: 06-05-2002, 05:03 PM
  5. Bash PET
    By civ1492 in forum Linux - General Topics
    Replies: 9
    Last Post: 05-14-2002, 12:52 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •