Aloha! I have just over 1k of users that have permissions that they shouldn't under our system. I need to parse a provided list of usernames, check their permissions file, and strip the permissions that they are not allowed to have. If upon the permissions strip they are left with no permissions, I need have a basic permissions line added to their permission file. I am creating this script so our helpdesk guys can use it later because I can see something similar happening again.
Everything on the following script works correctly unless the user has no permissions left. The sed statement will display the correct insertion but will not overwrite the file. I have also tried piping it to cat and then redirect to the file but that just appends....Please Help!!
Oh! BTW this is in Korn shell under AIX 5.3
Also FYI permission lines are always first in the file and they are the only lines that start with numerals.
Here is the sed insert file::
On execution of this script the users that have no permissions are left with a completely blank file (there should be other settings in the file besides permissions). The users that have other permissions are fine.
Any help will be greatly appreciated.
Mahalo!!
Last edited by Malumake; 10-23-2007 at 09:17 PM..
Reason: Additional Information
Hello All,
I am new to using sed, and I need to extract from the string data after : delimeter.
Can you help me please with the sed command?
Here's the input:
ipAddress: 10.20.10.11
ioIpAddressNodeB: 10.20.10.10
ioIpAddressNodeA: 10.20.10.9
ipAddress: 0.0.0.0
Expected Output:... (7 Replies)
File 1
<html>ta da....unique file name I want to give file=>343...</html>
<html>da ta 234 </html>
<html>pa da 542 </html>
and so on...
File 2
343
234
542
and so on, each line in File 1 one also corresponds with each line in File 2
I have tried several grep, sed, while .. read, do,... (4 Replies)
Hi All,
I have a xml file and requirement is to remove the line feed and add line feed after some element.
<?xml version="1.0" ?>
<AUDITRECORDS>
<CARF>
<HED>
<VN1>20090616010622</VN1>
<VN2>0</VN2>
<VN3>1090</VN3>
<VN4>CONFIG_DATA</VN4>
... (8 Replies)
Hi,
I need help with a maybe total simple issue but somehow I am not getting it.
I am not able to etablish a sed or awk command which is adding to the first line in a text and removing only from the last line the ",".
The file is looking like follow:
TABLE1,
TABLE2,
.
.
.
TABLE99,... (4 Replies)
Greetings,
I recently built a replicated DRBD, Heartbeat, & iSCSI Target Initiator storage server on Ubuntu 10.04 to offer shared storage to server Vmware ESX and Microsoft Clusters. Everything works flawlessly, however I wanted to make a script to create, remove, grow volumes to offer ESX... (6 Replies)
Hello everyone,
This is my first posting. I have read the rules of this forum. I have searched many various threads and haven't found one that applies to my situation or suggestions to fix the issue. I do appreciate the help.
I am trying to execute a basic UNIX script in a Solaris... (4 Replies)
I have a test file with the following format, It contains the username_date when the user was locked from the database.
$ cat lockedusers.txt
TEST1_21062016
TEST2_02122015
TEST3_01032016
TEST4_01042016
I'm writing a ksh script and faced with this difficult scenario for my... (11 Replies)
Hello,
I'm trying to figure out how to speed up the following as I want to use multiple commands to search thousands of files.
is there a way to speed things up?
Example I want to search a bunch of files for a specific line, if this line already exists do nothing, if it doesn't exist add it... (4 Replies)
Discussion started by: f77hack
4 Replies
LEARN ABOUT DEBIAN
cgconfigparser
CGCONFIGPARSER(8) libcgroup Manual CGCONFIGPARSER(8)NAME
cgconfigparser - setup control group file system
SYNOPSIS
cgconfigparser [-h] [-l <filename>] [-L <directory>] [...]
OPTIONS -h, --help
Displays help.
-l, --load=FILE
Parses the control groups configuration file Sets up the control group file system defined by the configuration file and mounts
mount points defined by the configuration file. The format of the file is described in cgconfig.conf. This option can be used mul-
tiple times and can be mixed with -L option.
-L, --load-directory=DIR
Finds all files in given directory and parses them in alphabetical order like they were specified by -l option. This option can be
used multiple times and can be mixed with -l option.
-a <agid>:<auid>
defines the default owner of the rest of the defined control group's files. These users are allowed to set subsystem parameters and
create subgroups. The default value is the same as has the parent cgroup.
-d, --dperm=mode
sets the default permissions of a control groups directory. The permissions needs to be specified as octal numbers e.g. -d 775.
-f, --fperm=mode
sets the default permissions of the control group files. The permissions needs to be specified as octal numbers e.g. -f 775. The
value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others permis-
sions to the owners permissions).
-s, --tperm=mode
sets the default permissions of the control group tasks files. The permissions needs to be specified as octal numbers e.g. -f 775.
The value is not used as given because the current owner's permissions are used as an umask (so 777 will set group and others per-
missions to the owners permissions).
-t <tuid>:<tgid>
defines the default owner of tasks file of the defined control group. I.e. this user and members of this group have write access to
the file.
SEE ALSO
cgconfig.conf (5)
Linux 2009-03-16 CGCONFIGPARSER(8)