Bakewell- starting bash in root (SOLVED)

Forum rules
We don't support installations in VirtualBox, VMWare, qemu or others. We ignore posts about WINE, PlayOnLinux, Steam and Skype. We don't support btrfs, lvm, UEFI, side-by-side installations with GPT or dualboot with anything newer than Windows XP.
Google your problem first. Check the Wiki. Read the existing threads. It's okay to "hijack" an existing thread, yes! If your problem is not yet covered, open a new thread. To get the quickest possible help, mention the exact release codename in your post (uname -a is a good idea, too). Due to the lack of crystal balls, attach the output of lspci -nnk if you encounter hardware problems.
khamryn
Virgin
Posts: 9
Joined: Sat Oct 12, 2013 6:25 am
Location: everywhere and nowhere

Bakewell- starting bash in root (SOLVED)

Unread post by khamryn » Thu Oct 17, 2013 9:08 am

Hi everyone.

I am trying to configure bash to run in root by default in LinuxBBQ-bakewell. I know I can get it in root by typing "bash", but I guess I'm used to most other distros where it bash is used right after I get into root automatically. I've spent a few hours searching and editing .bashrc and .bash_profile with no luck. Any lead will be most appreciated.

example:
after login "su" I get:
"#"

what I want after login "su":
"root@grill:/#"

Thanks in advance.
Last edited by khamryn on Thu Oct 17, 2013 7:09 pm, edited 2 times in total.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Bakewell- starting bash in root

Unread post by wuxmedia » Thu Oct 17, 2013 9:46 am

you are in a root shell, change your prompt.

http://crunchbang.org/forums/viewtopic.php?id=25803
http://www.cyberciti.biz/tips/howto-lin ... rompt.html

mine looks like this default;;

Code: Select all

force_color_prompt=yes

if [ -n "$force_color_prompt" ]; then
    if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
        # We have color support; assume it's compliant with Ecma-48
        # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
        # a case would tend to support setf rather than setaf.)
        color_prompt=yes
    else
        color_prompt=
    fi
fi

if [ "$color_prompt" = yes ]; then
    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$$
else
    PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
unset color_prompt force_color_prompt
"Seek, and Ye shall find"
"Github | Chooons | Site"

khamryn
Virgin
Posts: 9
Joined: Sat Oct 12, 2013 6:25 am
Location: everywhere and nowhere

Re: Bakewell- starting bash in root (SOLVED)

Unread post by khamryn » Thu Oct 17, 2013 6:59 pm

Thanks for the tip wux. I searched you praising on prompt shell and found all it needed was a quick edit to the /etc/passwd file. I updated the root to point to :/bin/bash. Thanks for your help.

User avatar
wuxmedia
Grasshopper
Posts: 6454
Joined: Wed Oct 17, 2012 11:32 am
Location: Back in Blighty
Contact:

Re: Bakewell- starting bash in root (SOLVED)

Unread post by wuxmedia » Thu Oct 17, 2013 9:12 pm

sorry, I couldn't quite work out your question - that's your login shell.
the default your user logs on with.

Glad you got it solved.

then WTF were you running before? ZSH?

Code: Select all

echo $SHELL
tells you what your current shell is, in future.
"Seek, and Ye shall find"
"Github | Chooons | Site"

khamryn
Virgin
Posts: 9
Joined: Sat Oct 12, 2013 6:25 am
Location: everywhere and nowhere

Re: Bakewell- starting bash in root (SOLVED)

Unread post by khamryn » Thu Oct 17, 2013 9:43 pm

I believe root default was /bin/sh

I never really explored this until now, since my last distro by default opened root with bash shell. Trust me, I'd post my echo if I'd know about it when I made the topic last night :P. Your advice really did help me find what I needed though :).

Post Reply