Sponsored Content
Top Forums Shell Programming and Scripting Sourcing as root automatically Post 302752041 by dasx on Saturday 5th of January 2013 11:12:27 AM
Old 01-05-2013
Quote:
Originally Posted by RudiC
su - does source the profile as it does a login. But, as you su to another user, it sources that user's profile, so make sure aaa is in root's profile and it will fly.
Yes, I can always put all my functions in the bashrc and be done with it. I just wanna know if there's any way to get the bash_profile sourced when logging in as root.

Thanks!
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

arguments in sourcing file

Hello ! I want to make a script like that. #!/bin/csh -f setenv toto me setenv titi you setenv tata $1 in which tata is visible outside the script, after sourcing this script. It seems that you can only do source script and not source script arg How can I do that ? ... (4 Replies)
Discussion started by: Nathe
4 Replies

2. UNIX for Dummies Questions & Answers

sourcing the .bashrc

Hello, I am quite new to Linux... I need to set some aliases and I can't get it to work. Can somebody tell me what's wrong? I modified the .bashrc file in my home directory. I added: alias pmv= '/home/vera/MGLTools-1.4.5/share/bin/pmv' saved it and ran source .bashrc The shell... (3 Replies)
Discussion started by: Nusy
3 Replies

3. Shell Programming and Scripting

Change root password automatically

I need to change root password automatically in some servers all three months. I want to run this process in one of the servers and reply it to the others. The password must be known by the administrator. (3 Replies)
Discussion started by: Alrica
3 Replies

4. Solaris

rootsh on Solaris 10 is not sourcing root's .profile

I'm attempting to setup rootsh on Solaris 10 to log the activity of users who require root access. However it does not appear to be sourcing root's .profile file even when run with the '-i' option. I was wondering if anybody else has run into this and might have a solution. Thank you. (9 Replies)
Discussion started by: kungfusnwbrdr
9 Replies

5. Solaris

Root file system automatically reduced from 90 to 40%

Greetings. i have solaris 9. I had a problem with root file system day before yesterday when it got 100% full, i reduced it to 90% but then after one day it was automatically reduced to 40%!!! no human intervention was done. no reboot done. Last time when i checked in proc FS there were a lot... (3 Replies)
Discussion started by: mr_os
3 Replies

6. Shell Programming and Scripting

sourcing .profile for other users

Hi Team, Thank you for your time. i have a situation where the user IDs of the applicatio users have been locked down to Read only. Hence I am writing a script to invoke their old .profile every time they login. My problem is : when i run . $userpath/.profile from within the ksh script... (9 Replies)
Discussion started by: anitha111
9 Replies

7. Solaris

Migration of system having UFS root FS with zones root to ZFS root FS

Hi All After downloading ZFS documentation from oracle site, I am able to successfully migrate UFS root FS without zones to ZFS root FS. But in case of UFS root file system with zones , I am successfully able to migrate global zone to zfs root file system but zone are still in UFS root file... (2 Replies)
Discussion started by: sb200
2 Replies

8. Red Hat

Crontab sourcing PATH?

Hi, Im trying to run script A which requires path /sbin. I have a crontab entry to run script A every 10 minutes. Script A is executed fine by cron, but because script A requires /sbin in its path it fails to run. My situation is script A get overwritten from time to time so I can't modify... (4 Replies)
Discussion started by: wilsonee
4 Replies

9. Shell Programming and Scripting

How to run script automatically on reboot as root user?

Hi friends,,, I am running one server on Ubuntu 12.04 LTS 32-bit, some times my pc restarts automatically, with no reason, I have a script to start server which requires root password. in this directory /myserver/start_server.sh How can I do this ? and some scripts I am having that I... (1 Reply)
Discussion started by: Akshay Hegde
1 Replies

10. Shell Programming and Scripting

Sourcing variables from another script

My manager required that i keep the hostnames and username and password in a separate file when creating my sftp script. (Don't mention passwords and sftp...I've talk to him about this several times) I have a list of hostnames that have to be read in a loop in my main script. I don't know... (3 Replies)
Discussion started by: MJCreations
3 Replies
remove profile(1m)														remove profile(1m)

NAME
remove profile - Removes all profile elements and the profile from the specified name service entry SYNOPSIS
rpccp remove profile profile-entry-name [-s syntax] OPTIONS
Indicates the name syntax of the entry name (optional). The only value for this option is the dce name syntax, which is the default name syntax. Until an alternative name syntax becomes available, specifying the -s option is unnecessary. ARGUMENTS
Indicates the name of the target profile. For an entry in the local cell, you can omit the cell name and specify only the cell-relative name. DESCRIPTION
The remove profile command removes a profile (and all of its elements) from the name service database. The entry name of the profile is required. Privilege Required You need write permission to the CDS object entry (the target profile entry). NOTE
This command is replaced at Revision 1.1 by the dcecp command and may not be provided in future releases of DCE. EXAMPLES
The following commands run RPCCP and remove the profile named /.:/LandS/anthro/molly_o_profile: $ rpccp rpccp> remove profile /.:/LandS/anthro/molly_o_profile RELATED INFORMATION
Commands: add element(1m), remove element(1m), show profile(1m) remove profile(1m)
All times are GMT -4. The time now is 09:23 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy