473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Shell password change with PHP ?

Hello

Is it possible to change shell user password via www form ? I mean using
fsockopen, scrtipt would connect to server via SSH, provide current username
and password and then execute shell command "passwd" and eventually change
password and close connection.
Can it be done? Or maybe its possible in other way if this script is
executed on the same server where this intended user accaunt is located.
Or should I learn Perl ? :)
Jul 17 '05 #1
2 3163
lecichy wrote:
Hello

Is it possible to change shell user password via www form ? I mean using
fsockopen, scrtipt would connect to server via SSH, provide current username
and password and then execute shell command "passwd" and eventually change
password and close connection.
Can it be done? Or maybe its possible in other way if this script is
executed on the same server where this intended user accaunt is located.
Or should I learn Perl ? :)

Should take a look at http://www.php.net/proc_open

Jul 17 '05 #2
lecichy wrote:
Hello

Is it possible to change shell user password via www form ? I mean using
fsockopen, scrtipt would connect to server via SSH, provide current
username and password and then execute shell command "passwd" and
eventually change password and close connection.
Can it be done? Or maybe its possible in other way if this script is
executed on the same server where this intended user accaunt is located.
Or should I learn Perl ? :)


Look into suid, or sudo, and yes, a perl script would be useful.

Do you know about nss-mysql ? Perhaps you might want to look into that too.

Kind Regards,

--
Ian P. Christian
Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Siemel Naran | last post by:
Hi. I'm writing a command shell that reads commands from standard input. At this point I have the command in a std::string. Now I want to execute this command in the shell. From the Borland...
1
by: Brian Sadler | last post by:
Does anyone know where I can find information on how to setup my shell in unix/linux to allow me to restore a database from an sql dump... Example... I have a database on 83200.mysql.com ...
4
by: Andrew Chanter | last post by:
I have a VB app that has a routine that runs macros in a (password protected) Access 97 db. (I have attached the code below.) Most of these macros end up opening a form in the Access db for the...
0
by: David Roche | last post by:
Hello, I searched all through Google Groups, Google, and the Postgres docs, but to no avail. I hope someone can help me out here! I have a file that contains SQL, and some Postgres-specific...
6
by: ferg | last post by:
People; i'm from argentina so , sorry, but my english isnīt good... Now, the question is; I'm trying to run a *.bat program on an ASP page, with the wsh script, but i canīt do it... because i...
1
goldenjt
by: goldenjt | last post by:
We currently have an HP-UX 11.11 OS and Oracle 9.2 database. I am trying to automate a script in which it will stop the listener, for to complete a cold backup of the database. We have the listener...
21
by: Tom Gur | last post by:
Hi, It's seems that csh and tcsh acts a bit different when handling special characters in quotes. i.e: if i'll supply my program with the following arguments: -winpath "c:\\temp\\" tcsh will...
7
by: aniljindal1983 | last post by:
i just want to do chmod on a file my_file but for that we must be su root. and finally that script will run through crontab ========================= #!/bin/ksh PASSWORD="pass123" echo...
3
by: bollweevil | last post by:
Hello Everyone, I do Django web development on my Mac at home, and then I rsync the files with the Ubuntu web server. I want to write one single bash shell script that rsyncs the files and...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.