Bash shell for root not sourcing .bashrc

Hi all
Finally got around to getting my home LAPP server up and running - on Arch of course!
Small problem that's really annoying. I can't get root's shell to source the .bashrc file.
I (kind of) followed the colorized prompt tip from the Wiki:
http://wiki.archlinux.org/index.php/Pos … nd_Console
Except I put EVERYTHING in to /etc/bashrc then sym linked my user and root ~/.bashrc to /etc/bashrc:
fukawi2 ~  $ ls -lha .bashrc
lrwxrwxrwx 1 fukawi2 fukawi2 11 2008-04-01 21:53 .bashrc -> /etc/bashrc
And that works fine. Root doesn't though. I tried removing the symlink and replacing it with a 'normal' .bashrc file that only sources /etc/bashrc if it exists:
[root@lapp ~]# cat .bashrc
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi
But if I source it manually after I su or sudo, it works fine:
fukawi2 ~  $ sudo -i
[root@lapp ~]#
[root@lapp ~]# (There's no pretty colorized prompt here)
[root@lapp ~]#
[root@lapp ~]# logout
fukawi2 ~  $ su -
Password:
[root@lapp ~]#
[root@lapp ~]# (Still no pretty prompt!)
[root@lapp ~]#
[root@lapp ~]# logout
fukawi2 ~  $ sudo -i
[root@lapp ~]# . .bashrc
root ~ #
root ~ #  (That's better; now I have the pretty prompt!)
root ~ #
Not having the colors doesn't bother me so much - it's not having all my aliases and not being able to change root's $PATH variable to include /usr/local/bin/ that's really annoying.
Anyone got any advice or suggestions please?

Besides having a .bashrc file, you also need a .bash_profile file in root's home directory.  .bash_profile should contain the following:
. $HOME/.bashrc
the .bash_profile file tells bash what file to use for configuration, which by convention has always been .bashrc.
HTH
Pudge
Edit:  Opps, too slow on the trigger.  Brebs beat me to it.  I spent too much time looking in man bash for an explanation of the .bash_profile and .bashrc files.
Last edited by Pudge (2008-04-03 02:04:54)

Similar Messages

  • Bash shell for  sid adm and ora sid user

    I'm planning to make bash shell as the the default shell for my <sid>adm and ora<sid> user. Will there any issues? It seems harmless.
    My current setups are ECC6 on top of  AIX 5.3 and Oracle 10g
    regards,
    Marjan

    The only problem is permission of user access to that bash shell. as well as what u u want to run i mean to say if it is any haevy erport or update insert or refresh functionality then do not run at the time of haevy load.
    Thanks

  • Bad entry in /etc/password for root

    I had a feeling that it wasn't a good idea to change the default shell for root. Tried it anyway because I know how to get myself back in on other Unix versions - Well I can't log in as root anymore. Can't even su to root (with or without '-'). b - s from the boot interpreter fails as well.
    What I'd like to try now is to boot in single user mode from CD and mount my hard drive and get to the /etc/passwd file.
    Does somebody has the exact procedure (or a better one)?
    Thanks
    Jim Theriault.

    This document outlines several methods to boot a Solaris 2.6/7 x86 system up to single-user mode. Most of these methods will work for earlier versions of Solaris x86 as well.
    Booting Single-User From CDROM Using the Device Configuration Assistant (DCA) on the Hard Drive:
    1). Power the system on.
    2). Insert the correct version Solaris Software cdrom for your system.
    OPTIONAL: If there is a boot loader in operation on your system, select the Solaris partition as the partition to boot from.
    3). After the "Solaris Secondary Boot Loader" and "Running Device Configuration Assistant" messages appear, hit the 'esc' key where prompted to do so.
    4). At the "DCA intro screen" hit F2 (F2_Continue).
    5). At the "list of devices found" hit F2 (F2_Continue).
    6). At the "list of available boot devices" select the CDROM as the device from which to boot a Solaris kernel.
    7). At the screen where you are prompted to select 1, 2, or 3 for what type of install you wish to do, enter 'b -s' instead of a number.
    This will bring the system up to single-user mode from the cdrom.
    Booting Single-User From the CDROM Using the Device Configuration Assistant (DCA) Floppy:
    1). With the power on, insert DCA floppy, then the correct version Solaris Software cdrom for your system.
    2). At the "DCA intro screen" hit F2 (F2_Continue).
    3). At the "list of devices found" hit F2 (F2_Continue).
    4). At the "list of available boot devices" select the CDROM as the device from which to boot a Solaris kernel.
    5). At the screen where you are prompted to select 1, 2, or 3 for what type of install you wish to do enter 'b -s' instead of a number.
    This will bring the system up to single-user mode from the cdrom. It should be noted that even though there are fewer steps, this normally takes much longer than running the DCA from the hard drive.
    You can then mount the root partition to /a (a standard mount point on the cdrom) and edit /a/etc/passwd

  • Bash 4.2.008-1 does not source /etc/bash.bashrc.local

    I don't know if this was intended change or not but it seems that /etc/bash.bashrc.local is no longer sourced by default.  All the global alias that I had set there are no longer being set.  Was /etc/bash.bashrc.local depreciated (if so where is the new place for such aliases) or is this a bug?

    Allan wrote:/etc/bash.bashrc does not source /etc/bash.bashrc.local by default.  You can either put your alias in /etc/bash.bashrc directly or do the sourcing yourself.
    Hmmm, you are right http://projects.archlinux.org/svntogit/ … 657ba94213
    Last edited by karol (2011-05-01 00:03:02)

  • $LS_COLORS stopped working (for user, not for root)

    Good day.
    Some time ago,  "ls" stopped paying attention to my color settings when coloring output for my user, while still working for root. For both root and my user, I set $LS_COLORS through ~/.bashrc as "eval $(dircolors -b)" but while this works fine for root, it at some point stopped working for my user, simply since the "eval" doesn't seem to work anymore. That is, what could be the reason for the below behavior?
    (note: I also have colored ls output without $LS_COLORS; just not the colors that I want, and which root does have).
    ===
    [rene@e600 ~]$ echo $LS_COLORS
    [rene@e600 ~]$ dircolors -b
    LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.axa=00;36:*.oga=00;36:*.spx=00;36:*.xspf=00;36:';
    export LS_COLORS
    [rene@e600 ~]$ eval $(dircolors -b)
    [rene@e600 ~]$ echo $LS_COLORS
    [rene@e600 ~]$
    ===
    bash is 4.2.045-5 (coreutils is 8.21-2)
    Regards,
    Rene

    I happens to have the same problem of yours after logging in to Gnome but i didn't test for root.
    I've followed what comment #40 says at
    https://bugs.launchpad.net/ubuntu/+sour … bug/549727 and the problem
    seems to gone.
    try removing ~/.gconf/desktop/gnome/peripherals/touchpad ?

  • Bash shell does not recognise 'java', 'javac' commands (Linux command line)

    i' ve used javac and java compile & execute commands to build the same application on the DOS command line with Windows - no problem.
    But when I try to compile the same file on the command line under Linux Redhat (7.1) using Bash shell i get <bash: javac: command not found> and <bash: java: command not found>.
    In both cases I'm using j2sdk1.4.2 downloaded from java.sun.com for Windows & Linux respectively.
    I make sure I have both the javac and the file I want to compile in the same directory ../j2sdk1.4.2/bin for both the Windows and the Linux applications.
    Is there something I need to do to get bash to recognise javac, java etc? Is there a different setup procedure?
    Any angles on this are much appreciated ..

    Have you tried these correctly..
    Set the CLASSPATH environment variable to include whichever directories you like, eg (on bash) type:
    export CLASSPATH=$CLASSPATH:.:<your java dirs>
    To make java easier to run, put the directory in which it is installed into your path:
    export JAVA_HOME=<where you installed java>
    Then do
    export PATH=$PATH:$JAVA_HOME/bin
    verify it has worked by simply typing
    java
    You can put all of these commands into the .*rc file for your shell, so that they are executed every time you open the shell. So if you are using bash you can put them into ~/.bashrc
    Read up setting the PATH and CLASSPATH for more info.
    This shall resolve the issue .

  • Power View in SharePoint Server - The data extension type for a data source is not valid

    Hi All,
    All of a sudden I am getting following error when trying to create Power View report using shared report data source (no error testing the connection):
    "The current action cannot be completed. The data extension type for a data source
    'http://dev/Shared Ducuments/Sales.rsds' is not valid for this operation"
    I already have a data source (I had created it after creating my site collection a week ago) and when I use this source to create Power View report then there is no error but I am getting above error when I create another similar data source and use it to create
    a Power View report.
    Please help me to resolve the error.
    Thanks

    I am going nuts! I had selected 'Analysis Services' instead of 'Microsoft BI Semantic Model for Power View'

  • Transfer rules are not exist for ECC Quality source system in BI Dev

    Hi,
    I Connected BI Dev system To ECC Dev and installed the sales, purchasing,... data flow, but here i am not getting the quality data to show the reports, to get Quality data  I established the connection between BI Dev and ECC QA, while installing the transfer rules for the ECC QA data sources there no transfer rules are exist(only some of them exist) in the business content, but all the update rules,... are exist, when i right on the data source say create transfer rules it is proposing App praposal.
    When i select source system as ECC dev while installing the transfer rules i can see all the transfer rules, but when i select source system as ECC QA i can see only some transfer rules.
    only problem with transfer rules(some of them exist), for remaining all objects are properly existing in business content for ECC QA source system.
    Regards,
    chandra

    Hi Fayzrakhmanov
    Thanks for the quick reply. We are not moving the stuff to QA. We are only connecting QA ECC system to BI Dev. We already have datasources moved to ECC QA and created source system for ECC QA in BI Dev.
    The problem is I am not able to get Business Content transful rule for new source system. We I can find some but not all unlike development.
    Help on this would be appreciated.
    Thanks

  • Remote Data Source Settings for Lotus Notes CWS

    I have installed the Crawler Web Service for Lotus Notes on a box seperate from Machine hosting Portal Server. After that I did all the migrations successfully at the portal side as mentioned in installation guide. But while configuring Remote data Source ,in Authentication Page , i am not getting an edit box to specify the User ID file.Its just have edit box to specify password.
    Its taking the last user id that was used in the Notes Client on that machine, or more specifically the KeyFilename setting in the Notes.ini file
    How can i set the User ID File(to be considered).
    Moreover there is an error
    An error occurred while validating the remote XUI service. Verify the Web Service settings, including the SOAP Encoding Style.
    Can anybody provide pointers on configuring the Remote Data Source for Lotus Notes database
    Thanks in Advance

    Hi,
    I would check this with the Lotus Notes guys. If the mail is OK in SOST, then SAP is delivering the mail correctly. There is something wrong with the Lotus Notes client itself. I have seen this same problem and I have alos witnessed the HTML email to crash the whole Lotus client. (This lead to a situation that it was just easier to send the plain text emails.)
    Regards,
    Karri

  • Data Not coming Properly for 0HR_PA_OS_1 Data Source?

    Hi Experts,
    I am trying to load data to 0PAOS_C01 using 0HR_PA_OS_1 data source. For field 0POS_OCCVAC key figure i am not getting any data from Data Source.
    I checked in RSA3 for 0HR_PA_OS_1 data source and  in that it is not populating data for filed OCC_VAC_PERC  field. I checked with HR functional team and they mentioned its a BI issue.
    Kindly tell me how can i populate values for the particular field. FYI i am getting correct data for other fields.
    Please help me.
    Thanks

    The possible reasons
    1.Your user id might not be having the proper authorization to pull the HR data.This you can confirm with your basis guy,if you are unable to find what are the authorization roles required for HR data, for the time being you can take SAP_ALL authorization in development box and try to pull.
                            OR
    2.Try to pull from BW side,you may be able to see the data there because this uses the background user id used in RFC connection ( provided if your background user id having proper authorization ).

  • Time series functions are not working in OBIEE for ESSBASE data source

    Hi All,
    I am facing a problem in OBIEE as I am getting error messages for measure columns with Time series functions(Ago,ToDate and PeriodRolling) in both RPD and Answers.
    Error is "Target database does not support Ago operation".
    But I am aware of OBIEE supports Time Series functions for Essbase data source.
    using Hyperion 9.3.1 as data source and obiee 11.1.1.5.0 as reporting tool.
    Appreciate your help.
    Thanks,
    Aravind

    Hi,
    is because the time series function are not supported for the framentation content, see the content of the oracle support:
    The error occurs due to the fact the fragmented data sources are used on some Time series measures. Time series measures (i.e. AGO) are not supported on fragmented data sources.
    Confirmation is documented in the following guide - Creating and Administering the Business Model and Mapping Layer in an Oracle BI Repository > Process of Creating and Administering Dimensions
    Ago or ToDate functionality is not supported on fragmented logical table sources. For more information, refer to “About Time Series Conversion Functions” on page 197.
    Regards,
    Gianluca

  • MDW Disk Usage for Database Report Error - A data source has not been supplied for the data source DS_TraceEvents

    Hello,
    On the MDW Disk Usage Collection Set report, I get the following error when I click on a database hyperlink.
    A data source has not been supplied for the data source DS_TraceEvents
    SQL profiler shows the following SQL statements are executed (I've replaced the database name with databaseX)
    1. exec sp_executesql N'SELECT
    dtb.name AS [Name]
    FROM
    master.sys.databases AS dtb
    WHERE
    (dtb.name=@_msparam_0)',N'@_msparam_0 nvarchar(4000)',@_msparam_0=N'databaseX'
    this returns zero rows as databaseX does not exist on my MDW central server, but is a database on a target server (i.e. one that is being monitored and uploaded into the MDW central server).
    2. USE [datatbaseX]
    this produces the following error:
    Msg 911, Level 16, State 1, Line 1
    Database 'databaseX' does not exist. Make sure that the name is entered correctly.
    why is the report looking for the database on my server?
    thanks
    Jag
    Environment: MDW (Management Data Warehouse) on SQL 2008 R2

    Hi Jag,
    Based on my test, while this database is offline, we will encounter this issue. This is because that while we click the certain database in “Disk Usage Collection
    Set” report, it will query some information with that certain database. If this database is offline, we will not access this database to acquire related information and generates this error.
    Therefore I recommend that you check the status of this database by using this system view:
    sys.databases. If it is not online, please execute
    the following statements in a new window to make this database to be online:
    USE master
    GO
    ALTER DATABASE <database name> SET ONLINE
    GO
    If anything is unclear, please let me know.
    Regards,
    Tom Li

  • IBook is not starting up - "still waiting for root device"

    The 600 MHz / 640 MB / 20 GB iBook did not want to wake up and after forced shutdown would not start up. grey screen. With MacOS X CD - "prohibition sign", MacOs 9 - no start at all
    I had 2 partitions on the HD one with Tiger and other with 9.2.2 - none of them appear in the list of startUp folders. would not go into the Target mode.
    I know there are few threads here with similar problem - I went through them but nothing of the suggestions would help.
    Did reset the PRAM (only once though) - when I still heard the startUp chime
    Did reset PMU
    Left the machine unplugged for about 12 hours
    Now I managed to get into single user mode while attempting to start up from a Tiger DVD. Here is what I see on the screen:
    "using 1638 buffer headers and 1638 cluster IO headers
    Extension "com.apple.driver.AppleTexas2Audio" has no kernel dependency.
    (then there are 14 extensions listed that has no kernel dependency)
    Firewire (OHCI) Apple ID 30 built-in now active, GUID 000393ff fe6ce976; max speed s400.
    ADB present: 8c
    ApplePMU: CLOCK RESET! PMU WAS PROBABLY RESET SOMEHOW!!
    Security auditing service present
    BSM auditing present
    disabled
    rooting via boot-uuid from / chosen: 7FF85 (a lot of symbols)
    Waiting on <dict ID="0"><key>IOProviderClass</key><string ID="1"><IOResources</string><key>IOResourceMatch</key><string ID="2">boot-uuid-media</string></dict>
    Still waiting for root device
    still waiting for root device
    and so on with "still waiting..." again and again
    also I did not hear start up sound anymore. Yesterday it was still audible.... can someone please help?!
    iBook dual USB   Mac OS X (10.4.5)  

    thanx for replying. Last night I finally managed to start up the machine using a FireWire ext HD as a StartUp Disk. Disk Utility and TechTool Pro and Disk Warrior are not showing the internal HD at all.
    Since I was not able to use any start CDs including original MacOs X and 9 Cds maybe it is a problem with Data Cable that connects both HD and optical drive with logic board? It is hard to imagine why it would come to something like that. Overheat? I did not have enough free space on Tiger partition - 1GB. Maybe that. I am starting to look for a replacement HD....
    iBook dual USB   Mac OS X (10.4.5)  

  • I have a computer Mac, and I enter in the module, so that it can unlock, but I cant not write does not accept letters, numbers or symbols, and asks me is waiting for root device, what can I do....

    I have a computer Mac, and I enter in the module, so that it can unlock, but I cant not write does not accept letters, numbers or symbols, and asks me is waiting for root device, What can I do?....

    Some more details will probably be required.  The OS X version will help, as a start.
    If you have the diagnostics DVD disk, boot that and see if there are any errors logged.
    If this is OS X that's installed on a MacBook Air that you're using, then some of the usual triggers and approaches for resolving the still waiting for root device errors are discussed here.  Have a look at that, and see if something in that sequence looks familiar, whether the PRAM reset or the safe boot helps or works here.
    If there's any anti-malware, I/O accellerator, antivirus tools or similar installed, get rid of it.  At least for testing.
    There's a mention of "other OS" in your footer.  If not OS X, what is the operating system in use here?  If this is some other hardware or software involved, then the triggers for this error can vary.  Widely.

  • [SOLVED]Where is the place to set program path for root in arch?

    The situation is that I use qingy (set up according to wiki) as login manager and kde as desktop. When I use tty6 (agetty) to login (how comes that I cannot login as root, have to login as user and then su) /usr/sbin is in the path for root, but in kde when I su in konsole it is not. That caused me some headache with the latest kernel upgrade, since in kde the kernel will not upgrade properly, I have to do it on tty6. what is the proper way to set paths in arch? I looked at /root/.bashrc and that is almost empty. What obvious things am I missing? Has qingy to do with that problems? Any docs on that for arch? Besides firefox doesn't see any installed plugins, opera does. Plain Centrino laptop here.
    Thanks, signor_rossi
    Last edited by signor_rossi (2007-08-24 15:12:31)

    Thanks for the answers. Investigated a little more and it seems it is really qingy what messes things up. Deactivated it and used "startxfce4" to start xfce and "startx" with "exec startkde" in my  .xinitrc to start kde (once I figured out that in Arch "startkde" on command prompt alone does not work ) and voila, the path weirdness is gone in both DEs. Will look again into qingy when I have more time, since it is really nice when using different X setups (laptop on the go or laptop on docking with second display), like the eye candy. I guess I will stick to console now and simply use bash aliases for that purpose.
    Thanks, signor_rossi.

Maybe you are looking for

  • After Return Delivery to Vendor cannot remove shipping notification in MD04

    Hi. Good Day. I would like to ask help regarding to my issue. We had to create a return delivery to send the goods back to the vendor A. The packaging item was blocked and we created the outbound delivery via transaction MBRL with reference to materi

  • Working with Layers | Learn Photoshop Elements 9 | Adobe TV

    With layers, you can work nondestructively and save all of your creative ideas in a single file. Learn about the various options in the Layers panel and how to harness the true power of Photoshop Elements by working with layers. http://adobe.ly/ynakt

  • Display as Text: Source or computation/process?

    I have a bunch (about 10) of Display as Text (does not save state) items on a page. The source for all these items is a single row in some table. I see 2 alternatives to populating these items 1. Specify the Source attribute for each item as the SQL

  • Oracle Shutdown/Startup Batch

    I need to create a batch file where I can shutdown and startup Oracle 10g database on Windows Server 2003.

  • Bullet points in Captivate 5.5 and 6.0

    I have not been able to get adequate support or an acceptable solution to this persistent problem so I'm posting it here hoping for some help. Image 1 is the original PowerPoint where the bullet points are spaced properly: Image 2 is taken after pres