Questions tagged [pbrun]
9 questions
2
votes
0 answers
"ssh -q" pbrun exec last login still showing up even with .hushlogin
I'm running the below script on RHEL 7.9 and after connecting to the remote machine and execing pbrun, the last login message is getting displayed and sometimes it interferes with the command which is forcing me to do many more steps than necessary…

tom
- 21
- 1
1
vote
0 answers
Ansible playbook with become_method=pbrun not working
I am a beginner on Ansible. I am trying to run command as a db user and we have pbrun setup for changing users in my company.
Below is how my pbrun policy is defined as :
[ RunAs User ] [ Command ]
root /bin/su - couchbase
root…

BeginnerSumB
- 11
- 2
1
vote
2 answers
Provide multiple lines of input to command executed on SSH server with JSch
I have a situation where a another pop like password is appearing, Means I need to enter another text after password and I also need to handle it programmatically.
below code is working for password
((ChannelExec)channel).setCommand("cd…

Shubham Jain
- 16,610
- 15
- 78
- 125
0
votes
0 answers
run pbrun command with password in shell script
I want to run the pbrun command to login and remove some files in the server but when using the below command pbrun command asking password, is there any way we can pass password also?
#!/usr/bin/expect -f
pbrun ehuid
expect -exact "Password: "
send…

rakesh kandukuri
- 195
- 1
- 11
0
votes
1 answer
how to link the pbrun session to the originating session?
ssh host1 -l user1
who am i
$ user1 pts/5
pbrun su - service1
who am i
$ service1 /dev/pts/2
So how can service1 session determine that is was launched by user1?

access_granted
- 1,807
- 20
- 25
0
votes
0 answers
How to use pbrun to run commands in shell script
We currently use pbrun to switch user and then run our commands.
For ex.
$ pbrun /bin/su - enterprisedb
Last login: Wed Nov 10 15:44:43 MST 2021 on pts/5
[enterprisedb@server_name ~]$ whoami
enterprisedb
[enterprisedb@server_name ~]$
Below is how…

BeginnerSumB
- 11
- 2
0
votes
0 answers
run shell commands right after pb run
I want to run a process right after pb run , I mean after pb running I want the shell commands to be passed to remote box, not sure how to do it.
Step 1)
I logon to jump box
step 2)
get access to dev node after doing pb run on jump box
step 3)
run…

sri hari kali charan Tummala
- 1,086
- 3
- 16
- 40
0
votes
1 answer
ansible 2.6.17 and pbrun su - user
I am testing ansible with pbrun. We ssh to the server using our own credential and then once ssh, we run pbrun su - orasoa to be able to install oracle binaries and domains.
I am testing 2 of my dev…

weblogicGuy
- 15
- 5
0
votes
0 answers
pbrun rm command not working in shell script
I am new to scripting part. I have a cron job running which trigger a shell script file. Inside the file I have below command to remove the file
pbrun rm -f {some file location}
I have to use pbrun because file is having the required permission for…

Anshu
- 1
- 3