Our system is an HP RP5470 11.11. We have had remote printing working for over 6 years. We use NetManage ViewNow software on our Windows client as the LPD. We had no problems with remote printing for any HP printer except for the HP LAserJet 1000. Nothing prints. I sent all the files in the... (2 Replies)
Hi,
I am writing a shell script to pull a file from a remote server (Let say its a windows based remote server). One of my criteria is to pull a file only if it is not empty.
We have done a similar script to push a file from our end to a remote server and before pushing it we check for the... (2 Replies)
Hi,
Im creating a script that is supposed to run commands on remote server using sftp.
My script is as below:
#!/bin/ksh
sftp remote_server
mypassword
cd /u08/mydir/allfiles
mget *
..
But this is what I got when I runned the script:
Connecting to remote server...... (3 Replies)
Hi all,
Iam looking out for a script which pulls archive logs from Server A to Server B. At the same time we donot want the archives to be deleted from Server A.
Request you to please help me on this.
Thanks,
Vivek (1 Reply)
Hi all,
Iam looking out for a shell script which pulls archive from Server A to Server B.
And at the same time, we dont want the archives which are already pulled in Server B to be removed from Server A.
Please help me on this, I have been trying on this for a quiet few time.
... (3 Replies)
Hi All,
I am having an abc.txt , which contains some digits
Eg:abc.txt
145
566
355
I want write shellscript in suchway that if any digit is greter than 1000 then it shuld display " text files contain digit, which is greater than 1000"
Please help me to do so
Thanks.. (8 Replies)
Hi,
I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script.
Can anyone help me in automating the script such that it... (3 Replies)
Hi guys,
So i am in server1 and i have to login to server 2, 3,4 and run some script there(logging script) and output its result. What i am doing is running the script in server2 and outputting it to a file in server 2 and then Scp'ing the file to server1. Similarly i am doing this for other... (5 Replies)
Hello All,
I need help writing a bash script that will run on 500 LINUX servers and do the following:
1. Capture the ipa_server name from /etc/sssd/sssd.conf on a list of 500 servers in the ipahosts file.
2. Write to a file outputing only server name and IPA server name.
Root ssh keys... (3 Replies)
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies
LEARN ABOUT DEBIAN
privileges::drop
Privileges::Drop(3pm) User Contributed Perl Documentation Privileges::Drop(3pm)NAME
Privileges::Drop - A module to make it simple to drop all privileges, even POSIX groups.
DESCRIPTION
This module tries to simplify the process of dropping privileges. This can be useful when your Perl program needs to bind to privileged
ports, etc. This module is much like Proc::UID, except that it's implemented in pure Perl. Special care has been taken to also drop saved
uid on platforms that support this, currently only test on on Linux.
SYNOPSIS
use Privileges::Drop;
# Do privileged stuff
# Drops privileges and sets euid/uid to 1000 and egid/gid to 1000.
drop_uidgid(1000, 1000);
# Drop privileges to user nobody looking up gid and uid with getpwname
# This also set the environment variables USER, LOGNAME, HOME and SHELL.
drop_privileges('nobody');
METHODS
drop_uidgid($uid, $gid, @groups)
Drops privileges and sets euid/uid to $uid and egid/gid to $gid.
Supplementary groups can be set in @groups.
drop_privileges($user)
Drops privileges to the $user, looking up gid and uid with getpwname and calling drop_uidgid() with these arguments.
The environment variables USER, LOGNAME, HOME and SHELL are also set to the values returned by getpwname.
Returns the $uid and $gid on success and dies on error.
NOTE: If drop_privileges() is called when you don't have root privileges it will just return undef;
NOTES
As this module only uses Perl's built-in functions, it relies on them to work correctly. That means setting $GID and $EGID should also call
setgroups(), something that might not have been the case before Perl 5.004. So if you are running an older version, Proc::UID might be a
better choice.
AUTHOR
Troels Liebe Bentsen <tlb@rapanden.dk>
COPYRIGHT
Copyright(C) 2007-2009 Troels Liebe Bentsen
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2012-03-10 Privileges::Drop(3pm)