How can i su automaticaly in same server with different username and same password?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How can i su automaticaly in same server with different username and same password?
# 1  
Old 07-07-2015
How can i su automaticaly in same server with different username and same password?

Hi I am new to shell scripting,
Can you please help me in writing a script that can switch user in same server with different user name and same password.
I want to perform some functional task in a particular user and need to switch user and perform same activity in another user and so on ...

Thanks in advance
# 2  
Old 07-07-2015
What I dont get is the "same passwd" and writing a script ... How do you think you will get the password to be read? Are you talking of a sofware like Oracle ( which accepts ) or true UNIX su?
My understanding is if itwere for some batch launched by cron then as root it can be done and you care not about password...
# 3  
Old 07-07-2015
check SSH
# 4  
Old 07-08-2015
I want to give password at first time and after that it should not ask for password for different username as password will be same for other users that i already given at first SU
# 5  
Old 07-08-2015
su does not work that way. Period.

ssh can work that way if you arrange for key based authentication and explicitly tell it to forward the key.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Script to log in SFTP server [with username, password]

Hi, everyone, I am trying to write a script to login automatically using username and password to an sftp server (the key authentication has been disabled so I cannot use that method). I tried to search online for a solution and found a way using "expect" but my boss does not want me to use... (4 Replies)
Discussion started by: warmboy610
4 Replies

2. UNIX for Dummies Questions & Answers

How do you reset username/password

Picked up a 3b2 running System V. Works fine, but it requires a username and password. Is the username "root" or "sysadm"? How do I find out and how to I reset it or bypass it? Thanks. (2 Replies)
Discussion started by: TanRuNomad
2 Replies

3. Shell Programming and Scripting

Username and password

Hi I am new to using unix and am struggling with a script i am writing. What i am trying to do is get a user to enter a username, check the original file i created with username and pin to see if their is a corresponding entry. Next ask the user to enter the pin and see if this matches... (5 Replies)
Discussion started by: somersetdan
5 Replies

4. UNIX and Linux Applications

Regarding NFS server username/password authentication

Hi; I had set up NFS server in one ubuntu box and mounted few directories using it. In order to access those directories across the network i m using j-ftp(an open source java network client) from other boxes in the same network.I am able to view my mounted directories in the server through it.... (1 Reply)
Discussion started by: ajaypadvi
1 Replies

5. Shell Programming and Scripting

input username and password interactively

Hi guys, I am using Solaris 10 and we install IBM OnDemand server there. there's a command called arsload that we use to load document and query document too. I need to write a script to query document but when querying document, this command prompt for username then password. My question is... (3 Replies)
Discussion started by: markthien
3 Replies

6. UNIX for Dummies Questions & Answers

How can i hide username/password

hi all, i run sqlplus command on unix(HP-UX) like "sqlplus username/password@serverA @deneme.sql" but when someone run "ps -ef | grep sqlplus", it can see my username and password :( How can i hide username and password. thanx. (1 Reply)
Discussion started by: temhem
1 Replies

7. Shell Programming and Scripting

Script for exporting FS into non global server automaticaly.

Post has been removed. Prakash K :) (0 Replies)
Discussion started by: bullz26
0 Replies

8. Solaris

i wanto hardcode password for a username to ssh to a server using script

Dear all i want to ssh to a server via running a shell script with a username and i want to hard code the password for that particular username can u help me please Thank u Naree (8 Replies)
Discussion started by: naree
8 Replies

9. Shell Programming and Scripting

username password in script

Can we write a script to telnet to a unix server from unix with the username and password hardcoded in the script?? something like ssh a@b -p password ??? (5 Replies)
Discussion started by: roshanjain2
5 Replies

10. UNIX for Dummies Questions & Answers

redirecting password as username for rlogin

Is the following even possible ? by echo $3, I mean enter password when prompted for it. My main issue is that it would deal with a prompted password, which is passed from the command line like this: ./processing serverA user password I cannot not use expect here, I heard that was very... (1 Reply)
Discussion started by: seaten
1 Replies
Login or Register to Ask a Question