1) Yes I know it's bad practice and obomination to all things holy, but I'm not a sys admin at JP Morgan, I'm a hobbyist tooling about in a VM, in my pants, at home.
2) If you are just going to flame for even considering hardcoding a root password, thanks, I get it.
So here goes.
I have the following script:
It works fine in that it enters the password and elevates the privileges of the user.
The problem is that it then exits at the marked point and does not continue to the code below.
Any ideas why this is?
Running Backbox 64 Bit in VMPlayer
Last edited by 3therk1ll; 01-18-2014 at 10:47 AM..
Reason: Forgot system details
Hi i just whant to update an password entry in /etc/shadow.
But dosen't get it to work. Something is wrong! in this code.
What i try do do is if user kalle exist in shadow.
I whant it to update it's password for just that entry.
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>... (2 Replies)
HI i need to delete an entry in /etc/security/passwd.
can't find a way to do it with userpw.h api ( AIX ).
the passwd file i delete like this.
Write all entrys to passwd file except the one we are removing.
can't find any function that works like getspent / getpwent do
in AIX userpw api.... (4 Replies)
I have a database that contains a list of server names, and the password for the root user on several servers (100+). I need to verify the passwords for each of the servers in an automated fashion because the database continues to grow. All of the users that I'm going to test are ROOT. I can't... (1 Reply)
Hi all,
putty connection manager is great but when attempting to sudo or ssh to another box via the post login commands it is subject to issues due to network latency (what happens is that pcm enters the password before the unix box is ready to receive it). Is there any clever way I can make... (1 Reply)
How would I grep for password file entry without using
grep 'username' /etc/passwd?
perhaps with who?
I want to create alias that will find the password file entry regardless of the user who is using it.
I am trying to get the same exact line from the file entry like:
Name : Password : UserID... (7 Replies)
How would I grep for password file entry without using
grep 'username' /etc/passwd?
perhaps with who?
I want to create alias that will find the password file entry regardless of the user who is using it.
Thanks (4 Replies)
hello all, i am trying to find a better to do what i am doing right now...
i have a file called sidlist...which has my database_name and password to the respective database
so something like below.. file is called sidlist and entry is below...
test, abc123
kes12, abcd12
pss, abcd1234... (5 Replies)
Hi,
we have around 50 users and every month we need to change the password manually once its expire.
do we have any script to change the password automatically.
OS -HP-UX
Thanks in advance.. (6 Replies)
Hi All,
Please help me and guide me to write a bash/shell script on Linux box to delete parent entry with all their child entries.
example:
Parent is :
----------
dn: email=yogesh.kumar@wipro.com, o=wipro, o=in
child is:
----------
dn: cn: yogesh kumar, email=yogesh.kumar@wipro.com,... (1 Reply)
Hi
I have a root script which is setting up user and his dirs and so on. After I create user and set up all the necessary I have to manually set user password. I try all possible ways what google find me and nothing works for me. If maybe one of you have a solution for my problem it will be... (1 Reply)
Discussion started by: Jaffakeks
1 Replies
LEARN ABOUT PHP
ovrimos_result_all
OVRIMOS_RESULT_ALL(3)OVRIMOS_RESULT_ALL(3)ovrimos_result_all - Prints the whole result set as an HTML tableSYNOPSIS
int ovrimos_result_all (int $result_id, [string $format])
DESCRIPTION
Prints the whole result set as an HTML table.
PARAMETERS
o $result_id
- A result identifier, returned by ovrimos_execute(3) or ovrimos_exec(3).
o $format
- Optional HTML attributes for the generated table element.
RETURN VALUES
Returns the number of rows in the generated table.
EXAMPLES
This will execute an SQL statement and print the result in an HTML table.
Example #1
Prepare a statement, execute, and view the result
<?php
$conn = ovrimos_connect("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_prepare($conn, "select table_id, table_name
from sys.tables where table_id = 7");
if ($res != 0) {
echo "Prepare ok!";
if (ovrimos_execute($res, array(3))) {
echo "Execute ok!
";
ovrimos_result_all($res);
} else {
echo "Execute not ok!";
}
ovrimos_free_result($res);
} else {
echo "Prepare not ok!
";
}
ovrimos_close($conn);
}
?>
Example #2
ovrimos_result_all(3) with meta-information
<?php
$conn = ovrimos_connect("db_host", "8001", "admin", "password");
if ($conn != 0) {
echo "Connection ok!";
$res = ovrimos_exec($conn, "select table_id, table_name
from sys.tables where table_id = 1");
if ($res != 0) {
echo "Statement ok! cursor=" . ovrimos_cursor($res) . "
";
$colnb = ovrimos_num_fields($res);
echo "Output columns=" . $colnb . "
";
for ($i=1; $i <= $colnb; $i++) {
$name = ovrimos_field_name($res, $i);
$type = ovrimos_field_type($res, $i);
$len = ovrimos_field_len($res, $i);
echo "Column " . $i . " name=" . $name . " type=" . $type . " len=" . $len . "
";
}
ovrimos_result_all($res);
ovrimos_free_result($res);
}
ovrimos_close($conn);
}
?>
PHP Documentation Group OVRIMOS_RESULT_ALL(3)