Non-interactive login using C program in UNIX(Solaris)


 
Thread Tools Search this Thread
Top Forums Programming Non-interactive login using C program in UNIX(Solaris)
# 1  
Old 01-20-2013
Non-interactive login using C program in UNIX(Solaris)

Hi i need a c programm to login in unix(solaris).
non-interactivley because it seems difficult to do it with unix shell scripting and passwd command cant be used and also
i don't have expect installed and i am not allowed to installed expect in our servers.
is there any c programm that can help me to do this where the pasword is supplied in the programm itself.


will it be applicable to other *nixes

and can i execute the c programm like :
Code:
mypasswd abcd abcd  //where mypassword is the binary executable and abcd is the password

instead of the usual passwd command wich goes interactive and asks for password:
Code:
 
passwd
new password:


Last edited by munish259272; 01-20-2013 at 08:57 AM..
# 2  
Old 01-20-2013
What network protocol are you using to login to Solaris. If you are using Secure Shell (SSH), then setup ssh-keys for password-less login.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Non-interactive & non-login shell environment?

Hello and thanks in advance for any help anyone can offer to straighten me out on this subject I'm trying to understand non-interactive & non-login shells and having a hard time conceptualize the process a non-interactive & non-login shell goes through to start up. Particularly for background... (7 Replies)
Discussion started by: bodisha
7 Replies

2. Homework & Coursework Questions

How to set a non-login non-interactive shell for a user?

I am sorry for creating a new topic after my previous inquiry was closed, but I tried and tried and I do not know how to edit my previous post. This is not exactly any homework, this is one of 40 questions we were expected to prepare for one of the labs. I searched and read what I could and still... (4 Replies)
Discussion started by: me_me_me
4 Replies

3. Red Hat

Su-only account with ssh capability and no interactive login

Hello experts, Is it possible to have an user account on RHEL 6.3 as a su-only account, but with ssh capability and no interactive login? Let me elaborate. Say, we have a cluster of 5 RHEL 6.3 servers and an user account (strmadmin) on each of the server as an su-only... (1 Reply)
Discussion started by: naveendronavall
1 Replies

4. Programming

Run interactive program in background and grep it

I need to run an interactive program in the background so I can grep it for specific data to use for some logic in a script. There is no quiet or background mode on the program so I plan to redirect a document with commands in it and then to grep the output. This is almost working, except... (1 Reply)
Discussion started by: doonan_79
1 Replies

5. UNIX for Dummies Questions & Answers

What is login and interactive shell?

Hi Guys, Excuse if am asking silly Que ... :rolleyes: Please explain me whats difference between login and interactive shell in Linux .. Have googled but still in doubt .. :confused: --Shirish Shukla (4 Replies)
Discussion started by: Shirishlnx
4 Replies

6. Shell Programming and Scripting

scripting an interactive program session

Hello, I'm looking to script the basic instant messaging program we have in my company, it's called "oi", it's working as follow: # oi $user then we have to launch it... after finding the system of the user it's asking for the message... then on a new line we have to hit ctrl+d I... (2 Replies)
Discussion started by: nomadvisuals
2 Replies

7. Shell Programming and Scripting

Develop Program with 'None Interactive Flag'

Hi I have created a program but am currently wondering how to develop it further. I wanted to know how i would go about developing the program further so that it is able to run with a "none interactive flag" enabling execution to be automated with the resultant file e-mailed to a user once a week.... (1 Reply)
Discussion started by: warlock129
1 Replies

8. Shell Programming and Scripting

how to write a shell script to login to a system which is interactive.

Can anybody help me to write a shell script to login interactive system once u open a connection using telnet it will ask for USERCODE: PASSWORD: DOMAIN: (1 Reply)
Discussion started by: sudhakaryadav
1 Replies

9. Shell Programming and Scripting

Running an Interactive Program Remotely

now, i have a program that i would very much prefer to run remotely as i hate having to log into the box it is on. the problem is, every command i have tried to run this remotely doesn't work. the commands tries to kick off the program on the remote box but then hangs. like take for... (3 Replies)
Discussion started by: Terrible
3 Replies

10. Shell Programming and Scripting

Making Interactive program

Hi Friends I am trying to make an interactive shell script ( I do not have expect tool ) My objective is 1.I have a progam named say "inter" The program when ran on command prompt will be as below Prompt>inter Please enter the choice 1.enter 1 2.enter 2 < I need to enter 1 or 2... (4 Replies)
Discussion started by: sivasenthil_k
4 Replies
Login or Register to Ask a Question