Hi All,
I am new to shell scripting.
Can someone let me know, how to check whether the user exists in the remote system?
I am building a new unix box and before I proceed installing the appliation , I want to check whether the required users are created in the system .
how to do this ?... (1 Reply)
Hi all,
I've been trying to find a good check I can put it in to a shell script to see if a given user exists.
Some of the things I've thought about is checking whether they have a home directory, but not all users have a home directory. I've thought about grepping the /etc/passwd file for... (4 Replies)
Hi friends..
I hav a problem....
I dont know how to check .c files exists r not in a folder using IF in C shell script
actually i tried like this
if(=~ *.c)
even though some .c files or there in the current folder..it is not entering int o the if control statement...... (17 Replies)
Hi All,
working on AIX 5.3.
Requirement is:
Shell script in ksh to check if any file exists in 4 folders as below:
1. /FILE/INB/INT1
2. /FILE/INB/INT2
3. /FILE/INB/INT3
4. /FILE/INB/INT4
Thanks a lot for your time!
a1_win. (3 Replies)
I was given this to do,
Write a Shell script to automatically check that a specified user is logged in to the computer.
The program should allow the person running the script to specify the name of the user to be checked, the frequency in seconds at which the script should check. If a... (0 Replies)
Hi, I'm new to C Shell programming. I'm trying to check if a sym link exists on remote server if not send email. I'm not having much luck. Can anyone help?
Here is what I have written but it doesn't work. It tells me that my variable was not defined. Here is part of the script, the second... (0 Replies)
Hi
#Testing for file existence
if ; then
echo 'SCHOOL data is available for processing'
else
echo 'SCHOOL DATA IS NOT AVAILABLE FOR PROCESSING'
:
i wrote a script, where it begins by checking if file exists or not.
If it exists, it truncates the database... (2 Replies)
How to check the user input to be valid using shell script?
The valid input is in the format like as follows.
1. It can only have r,w,x or a hyphen and nothing else.
2. ensure the r, w, x are in the correct order.
for example: rwxr-xr-x is a valid format.
Thanks (5 Replies)
Hi All,
I am a beginner in this and trying to write a shell script in linux which will :
1. Ask for a file name and check if its exists.
2. If file exists only then it will ask for the new target folder, after entering target folder name it will check if it exists.
3. If target folder... (3 Replies)
Hi,
I have the below code written. However I am not getting the desired output
I am checking if the particular path has file in it.
#!/bin/bash
ls -l /IRS2/IRS2_ODI/INFILE/*LS* 1>/dev/null 2>/dev/null
if
then
echo $?
echo "File Exists"
fi
... (3 Replies)
Discussion started by: Shanmugapriya D
3 Replies
LEARN ABOUT PHP
posix_setuid
POSIX_SETUID(3) 1 POSIX_SETUID(3)posix_setuid - Set the UID of the current processSYNOPSIS
bool posix_setuid (int $uid)
DESCRIPTION
Set the real user ID of the current process. This is a privileged function that needs appropriate privileges (usually root) on the system
to be able to perform this function.
PARAMETERS
o $uid
- The user id.
RETURN VALUES
Returns TRUE on success or FALSE on failure.
EXAMPLES
Example #1
posix_setuid(3) example
This example will show the current user id and then set it to a different value.
<?php
echo posix_getuid()."
"; //10001
echo posix_geteuid()."
"; //10001
posix_setuid(10000);
echo posix_getuid()."
"; //10000
echo posix_geteuid()."
"; //10000
?>
SEE ALSO posix_setgid(3), posix_seteuid(3), posix_getuid(3), posix_geteuid(3).
PHP Documentation Group POSIX_SETUID(3)