Issues with "SU - userid -c command" on system reboot


 
Thread Tools Search this Thread
Operating Systems AIX Issues with "SU - userid -c command" on system reboot
# 1  
Old 06-27-2006
Issues with "SU - userid -c command" on system reboot

Hi All!

My db2 is started in the AIX /etc/inittab on systemreboot as follows
db3:2Smilience:su - db2inst3 -c db2start >/dev/console 2>1

I changed the .profile of db2inst3 to put an alias to the db2start command as follows
alias db2start="/usr/bin/ksh /home/db2inst3/sample/db2start.ksh"

When I issue db2start logged in as db2inst3, it executes the /home/db2inst3/sample/db2start.ksh startup script but on a system reboot this script is not being executed.

I thought that when you issue "su - userid and execute a command the .profile is executed and the command gets executed as if from db2inst3 user profile. But there seem to be differences. Would appreciate any input on this.

Thanks in advance
# 2  
Old 06-28-2006
a amall question

When i issue a su <userid> what does it mean swithch user or superuser.

Ex: There are two users say user1 and user2.Now a file is owned by user1 and i want to zip it and i am user2 .When i say su user1 does it make me a superuser or just gives me the permissions to work on the files owned by user1
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

What does "force devmap reload" as in "multipath -r" means for my system and stability of my system?

Cannot present unpresented disks back again. On a test server tried this as a solution "multipath -r" and it worked. Too worried to try it in production before I know all the information. Any info would be appreciated! Also some links to the documentation on this specific issue could help a... (1 Reply)
Discussion started by: jsteppe
1 Replies

2. Solaris

Changing "rx_queue_number" in "ixgbe.conf". Reboot or Network Restart?

Hi all, First post here. Working on Solaris 10, on a Sun t4-4, need to change RX queue depth(ethernet, not HBA) and was wondering if i could get by with just restarting the network or if i should just bounce the whole shebang. Apologies if i missed a similar thread. if there is one, please... (2 Replies)
Discussion started by: caspnx
2 Replies

3. Shell Programming and Scripting

awk "date" and "system" command

Hello experts! I need your help please I have a file.txt of which I want to extract 3rd and 4th columns with date with the form e.g.: 2016-11-25 03:14:50and pass them to "date" command, but also append the 9th column in a file as well. So I want to execute date -d '2016-11-25 03:14:50' ... (2 Replies)
Discussion started by: phaethon
2 Replies

4. AIX

Sendmail "from" is not from the userID sending

On one of my servers (AIX 7.1 sendmail=V10/Berkeley) When I login and sudo su to a serviceID and send a test email, the from header shows as being from my loginID and not the serviceID. I have a second server (AIX 6.1 sendmail=V9/Berkeley) where following the same steps the email head has the... (3 Replies)
Discussion started by: LCarpenter
3 Replies

5. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

6. Shell Programming and Scripting

Problem using "system" command in perl

Hello!!! I'm trying to pass the output from bash command to perl variable in a perl script, and I used the "system" command to execute the bash statment and pass the result to perl string variable, in this perl script I used a variable $file that store data for using it as a regular expression.... (2 Replies)
Discussion started by: evolabo
2 Replies

7. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

8. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

9. Shell Programming and Scripting

Can someone help me to convert the date format after get it from the "LAST REBOOT" command.

Can someone help me to convert the date format after get it from the "LAST REBOOT" command. these is the standard output. bash-3.00# last reboot reboot system boot Fri Aug 6 15:07 reboot system down Fri Aug 6 15:04 reboot system boot ... (3 Replies)
Discussion started by: pichitw
3 Replies

10. UNIX for Advanced & Expert Users

Question on UserID with "root" priviledges

I know we can create a normal UserID with "root" priviledges by assigning the user into the "root" group. As such, everything that is modified by the UserID will also contain "root" as the group and ID. This is return causes less tracability on who made the change onto a certain file, etc. My... (3 Replies)
Discussion started by: Alvin
3 Replies
Login or Register to Ask a Question