Perl CGI to access / edit "root" owned config files
I am trying to write a CGI program which accesses UNIX configuration files and changes them as required.
The thing is, I don't want the CGI program to be "root" owned - it's Perl based! Is there any way that the Perl CGI program can request a username and password - and then use this to manipulate the config files?
Hmm, not sure if this will help or not. Basically, yes, you can 'request' the username and password and compare with what is on the system. Can you then change files owned by root? Probably. More difficult than I would want to think about.
Unless you are doing this for your own interest (or your company doesn't allow 3rd party software) might one suggest some software: CFengine
If that isn't what you are looking for, then maybe Webmin
I'm sure other will have other software they use and prefer. I've seen both of these but don't use them.
The following can take the input of a password and check it against info in the shadow file by sending the userid in the first parameter and the password in the second.
Hello.
System : opensuse leap 42.3
I have a bash script that build a text file.
I would like the last command doing :
print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt
where :
print_cmd ::= some printing... (1 Reply)
Dear Ladies & Gents,
I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out:
for filename in $(find /var/log/test... (2 Replies)
Our AIX servers send e-mails which have the "from" address set to "root@company.com" for our root user ("C{M}company.com" in /etc/sendmail.cf). The problem is that when bad e-mails are sent out or rejected by remote servers, they are being returned and delivered to e-mail box of "Mary Root".
... (2 Replies)
What exactly is this code returning:
perl -MConfig -e 'print "$Config{byteorder}\n";'
I am executing this command in two platforms.
In AIX i am getting : 4321
In Linux i am getting: 12345678
Does it mean that a byte size in aix is of 4 bits(is it possible)?
Also, will there be... (2 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
Hello;
I am posting to get any help on my code that I have been struggling for some time. The project is to join two files each with 80k~180k rows. I want to merge them together by the shared common column. The problem of the shared column is partially matching, not exactly the same.
File1:... (5 Replies)
Hi All,
I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations:
1. I am restrained to 2 input files only.
2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Hi,
could someone pls enlighten me on the difference between the "root" package and "usr" package?
Like in this example:
pkginfo -l SUNWGtku | grep -i desc
DESC: GTK - The GIMP Toolkit (Usr)
and
pkginfo -l SUNWGtkr | grep -i desc
DESC: GTK - The GIMP Toolkit (Root)... (6 Replies)
I wrote a script to delete files which are older than "x" days, if the size of the directory is greater than "y"
#!/bin/bash
du -hs $1
while read SIZE ENTRY
do
if ;
then
find $1 -mtime +$2 -exec rm -f {} \;
echo "Files older than $2 days deleted"
else
echo "free Space available"... (4 Replies)
Hi All ,
I want to delete files from /tmp directory created by "xxxx" id.
because i got the list says more than 60 thousand files were created by "xxxx" id since 2002.
The /tmp directory has lot of files created by different user ids like root,system etc..
But, i need a script to... (2 Replies)