Programming :: Bash - Search For 1000 Then Assign Them Group 1 And Then 1001-1999 To Group 2

May 24, 2010

I have a text file that currently has around 150 000 usernames in it. I need to somehow group them into smaller groups of 1000 and then add that value into the DB. for example user xzy group 1 (hopefully the groups will be digits incrementing)

[Code]....

how to search for 1000 then assign them group 1 and then 1001-1999 to group 2 etc.

View 3 Replies


ADVERTISEMENT

Debian :: Add A New Group With Gid 1001?

Mar 19, 2011

How to add a new group with gid 1001 from the command line on squeeze?

View 1 Replies View Related

Programming :: Bash Script Multithread In Group Of 3?

Jun 1, 2010

I Have an script like

./bang 1
./bang 2
./bang 3
./bang 4

[code]...

and i wanna execute him in groups of 3 , i mean he execute bang 1 , bang 2 and bang 3 after it finish the next 3 commands it will be executed and so on , in groups of 3.

View 3 Replies View Related

General :: Assign Oneself To A Group To Get Access To A File

Sep 4, 2009

I'm on a regular Fedora 9 desktop computer with an ext3fs filesystem.

I'm trying to give myself access to /dev/ttyS0. This is because I'm developing code that uses a serial port. While I'm developing this code I don't want to be continually working as super user. I have the following information about /dev/ttyS0:

Code:

So as root I added myself (username freddy) to the group uucp. This is just temporary, for while I work on this code and try different stuff as user freddy. Once the code is established and I have a single program with a fixed name, I plan to give myself an entry in /etc/sudoers that will allow me to run the finished program.

Here's the info on user freddy:

Code:

The problem then is that now if I try to use /dev/ttyS0 I can't.

Code:

I thought that if I was a member of group uucp which is associated with /dev/ttyS0 that I would be given rw access to /dev/ttyS0. What am I missing here?

What the c stands for in the ls -l listing?

View 2 Replies View Related

Ubuntu :: Create A User Group That Restricts Internet Privileges To Only Members In The Group

Jul 19, 2011

How can I create a user group that restricts Internet privileges to only members in the group, then I will assigns certain applications to join the group for access to the Internet.

For example, I want only group net to have access to the Internet. Group net is then connected to:

Code:

So far, I am using the gnome group policy manager that is standard with ubuntu but Its not working. It is possible that im misdirected and that I should use a firewall instead?

View 2 Replies View Related

General :: Secondary Group Users Need To Change File Permissions Of Primary Group Files?

Oct 19, 2009

i want secondary users can able to change the files permissions of primary group?user MAC is having www as a primary and httpd as secondary group. But he want to change the file permissions (chmod) httpd group files. Is it possible or not? I think its not possible. If it`s possible then let me know how?

View 3 Replies View Related

Software :: EXT3-fserror: Inode Bitmap For Group 4 Not In Group

May 25, 2011

I've been tasked with fixing a Red Hat system that dies with a kernel panic during the boot stage:

Code:

EXT3-fserror (dev sda1): ext3_check_descriptors: Inode bitmap for group 4 not in group (block 67239937)!
EXT3-fs: group descriptors corrupted!
mount: error mounting /dev/root on /sysroot as ext3: Invalid argument

I can boot into a Rescue CD, but I'm a bit out of my element because I don't use EXT3 myself, and I've never had to repair a corrupted file system before.

View 3 Replies View Related

General :: Group Member Not Able To Write To Group's File?

Feb 8, 2011

I have a group (GROUP) with a number of users. I recently added a new user (NEW). NEW is able to read but not write group files, whereas all the other users in the group can read and write to the group files. The permissions for the group files indicate that all members of group should have write permission -rwxrwxr-x

/etc/group indicates that NEW is a member of GROUP
...
GROUP:x:501:GROUP,OLD,OLD2,OLD3,OLD4,....,NEW

[code]....

Don't know if it matters, but both OLD and NEW write to the GROUP files over an internet connection. why NEW can't write to GROUP files? Is there a maximum number of members in a group that I might have exceeded?

View 2 Replies View Related

General :: Search Word In Group Of Files Using Command?

Oct 10, 2009

i am using openSUSE 10.3 & like to use power of terminal to do tasks.I want to search all files containing word 'echo' in given folder.What should be command.

View 14 Replies View Related

Ubuntu :: Error - Group: Cannot Find Name For Group ID 0

Apr 17, 2010

Mount of filesystem failed. A maintenance shell will now be started CONTROL-D will terminate this shell and retry. groups: cannot find name for group ID 0 root@Sergioc-desktop:"#

View 2 Replies View Related

General :: Security Group Can Be A Member Of Another Group?

Aug 22, 2010

I need to create a group that has the same permissions as the users group. Can I have the new group be a member of the "users" group to inherit its permissions?

View 4 Replies View Related

Security :: Add A Group Of Users To The Wheel Group?

May 19, 2010

I have a number of users, categorised into various groups. I would like one of those groups ("developers") to be in the wheel group as well. I don't want to just copy the people from the developers group into wheel, because then when that group changes I'll have to change it in two places. Is there a way to specify that anyone in developers is in wheel, and have that be dynamic?

View 7 Replies View Related

Debian :: Group A Member Of Another Group?

Feb 8, 2011

I make a group a member of another group?

I am running Samba and want to include all groups as members of the Domain Users group so that I don't need to add this for every user?

View 3 Replies View Related

Fedora :: Bash Cannot Set Terminal Process Group

Nov 17, 2009

Urgent: on reboot, the Fedora 11 lower bars reach about 70-80%, then I get the message:

/dev/mapper/VolGroup-lv_root: (There are 22 inodes containing multiply-claimed blocks.)
File /home/burnie/.thumbnails/normal/[bunchofhexits].png (inode #15826, mod time Mon Nov 2 04:24:26 2009) has 13 multiply-claimed blocks, shared with 1 file:

[code]....

Just in case this is relevant, yesterday I spent several hours attempting (and failing) to build IcedTea in order to run a Java web service that required it. After the failure occurred, I exited Linux and went to Windows Vista to run the web service, and found that Vista cannot support 64-bit Firefox, so I rebooted to Linux, and ran make clean on the Iced Tea installation, which balked because a stamps directory could not be deleted because it was not empty; I followed this by make distclean which made the same complaint. So I manually deleted the files in the stamps subdirectory, ran make distclean "cleanly", and then rebooted to reach my current very unsatisfactory state.

View 6 Replies View Related

Software :: Member Of Group Root / But Root Group Permissions Don't Apply?

Apr 20, 2010

A bit of an oddity that I've recently run into with my storage folder in my system; it's a newly installed drive that I've set to mount at /storage. When I first tried to use it, programs that I used that attempted to write to it tossed Access Denied errors at me in their own way. Checking the permissions (at the Terminal, ls -l / | grep storage) showed that /storage was set to 'rwxrwxr--'--Owner and Group were given full read/write/execute, but Others could only read. However, my logon to my system is a member of group root. Why, then, with the above bits set, would I not be able to write to it? Changing Others permissions to rwx (and presumably rw would have worked out for me since I don't leave anything executable there) allowed me to write to it, but I don't understand why that would have been necessary. So far as I'm aware, the prior drive that was in my system--mounted at the same location--did not need this treatment.

View 7 Replies View Related

Software :: Allow A Group/user To Execute A Command, Where One Of The Parameters Of The Command Is A Group As Well?

May 3, 2010

Is it possible to allow a group/user to execute a command, where one of the parameters of the command is a group as well? example that does not work as intended:

Code:
Cmnd_alias SU=/bin/su -l %group1 This example works sortof, it treats the "%group1" literally. I know I can list out the "/bin/su -l <eachuser>", but as you can imagine that is impractical. In this example, I want people in group2(not shown for brevity sake) to be able to su to someone in group1

View 13 Replies View Related

Programming :: Isolate Users From A Group?

Dec 5, 2010

how to isolate users from a group ie accounting and force them to change their password upon login

View 1 Replies View Related

Programming :: Get Group Name From GID Without Parsing /etc/groups?

Sep 14, 2010

Is there a Linux system call that can be used to get the group name from the GID returned by stat()? I realize that I could parse /etc/groups (if my user had sufficient permissions).

View 3 Replies View Related

Programming :: Set For A Group Of Command Line Arguments?

Oct 11, 2010

i was wondering if someone could help me figure out a script for global variables i'm trying to set for a group of command line arguments:

basically i'm trying to set: if $# = 3 then i want to search for each all string $1 $2 $3

if $# = 4

then i want to search for each all string $1 $2 $3 $4

View 2 Replies View Related

Programming :: Create Single Group From All Other Groups?

Mar 14, 2011

I would like to create a bash script that creates a single group from all users in other groups.

I've been at it most of the day, and I think I'm making it too complicated. I have about 100 lines of code, and it's still now working the way I would like. I'm starting to trip over my own feet with the amount of if statements and variables.

View 1 Replies View Related

Programming :: Applying Group Ideology To Web Applications?

Dec 2, 2010

I have built a database driven web application that has a user and group system that works in a similiar way that Linux handles user access. Breif explanation: A users can access various resources, the resources are assigned to a single group and users can have many groups.

Users

Code:

id name
-- -------
1 RedRanger
2 GreenRanger
3 BlueRanger

[code]....

Lets say that RedRanger needs to be denied access to resource a if I remove him from group 33 he can no longer access b or c which is no good. The only alternative is to change a's group and add everyone else to the new group, this isn't so bad for 3 users, but what about 3,000?

View 1 Replies View Related

Programming :: MYSQL Select ORDER BY, GROUP BY Together?

Apr 19, 2010

I'm writing a PHP script, and I need a top 10 result from a mysql query.I've tryed like this:select IP,sum(download) from traf group by IP order by ASC limit 0,10and my sql returnsmysql> select IP,sum(download) from traf group by IP order by ASC limit 0, 10;ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ASC limit 0, 10' at line 1As I red through Google this is not quite supported by mysql, so is there another way to do this?

View 5 Replies View Related

Programming :: Script To Copy Files From One Host To A Group?

Mar 31, 2011

I have one script that goes through some IPs:

###############################3
#/usr/bin/sh
# This is a script to copy files from one host to a group of

[code]....

View 6 Replies View Related

Programming :: C++ Determine If Current User Is Member Of A Specific Group?

Jan 12, 2011

What functions are available on linux for a c++ program to determine if the current user is a member of a specific user group?

View 3 Replies View Related

Programming :: Python Regular Expression - AttributeError: 'NoneType' Object Has No Attribute 'group'

Aug 23, 2010

I am trying to scan a website for http references (links) with this script:

Code:

from urllib import urlopen
import re
current_site = urlopen("http://en.wikipedia.org/wiki/").read()
search = re.search('href="[a-zA-Z0-9]"', current_site)

[code]....

I get the following error message:

Code: Traceback (most recent call last): File "C:UsersadminDesktopcrawler.py", line 8, in <mo print search.group(0) AttributeError: 'NoneType' object has no attribute 'group' I have googled the error

View 2 Replies View Related

Debian Programming :: Assign Variable In Bash When Stdout Is Updated

Jan 17, 2014

I am writing a script that calls a program which writes a lot of lines to stdout continuosly. If the last line in stdout has some regex, THEN, certain variables are updated. My problem is that I don't know how to do that.

A simplified example would be (it's not my exact case, but it I write it here to clarify): suppose I issue a ping command (which writes output to stdout continuously). Every time that the response time is t=0.025 ms, THEN, VARIABLE1=(column1 of that line) and VARIABLE2=(column2 of that line).

I think the following code would work in awk (however, I want the variables in bash and I don't know how to export them)

Code: Select allping localhost |awk '{ if ( $8 == "time=0.025" ) var1=$1 var2=$2}'

In the previous code, awk analyzes each line of the output of the ping command as soon as it is created, so the variables $var1, $var2, ... are updated at the appropriate time. But I need the "real-time" updated values of $var1, $var2 in bash, for later use in the script.

View 7 Replies View Related

Programming :: Bash Scripting...read A Value From A File Then Assign To Variable?

Feb 27, 2011

At my wit's end I can't find anything that I understand well enough to use. This is for a Unix class, we are working with shell scripting. File1 has 5 in it and File2 has 100 in it.The teacher wants us to read the values then do the math. This is what I have so far:#!/bin/bashvar1='cat File1'var2='cat File2'var3=`echo "scale=4; $var1 / $var2" | bc`echo The final result is: $var3

View 9 Replies View Related

Programming :: Bash Script: Assign Command Ouput To A Variable Without Executing It?

Feb 12, 2011

I'm trying to execute the following command within a bash script:

Code:
tac /var/log/system.log | head -1
The script I wrote is:

[code]...

View 1 Replies View Related

Programming :: Search Within A Variable And Assign The Results To A New Variable?

Apr 25, 2011

how I can search within a variable and assign the results to a new variable. I'll use the following as an example -

cars="Audi BMW Cadillac Chevy Dodge Ferrari Ford Mercedes"
list=`echo ${cars} | egrep -o '<A?+|<C+'`

with the echo command I get the following output assigned to list -

A
C
C

What I'd like to get for output is -

Audi
Cadillac
Chevy

how I could do this regardless of upper/lower case letters?

View 5 Replies View Related

Programming :: Bash Search Line And Replace Hex To Binary?

Jul 7, 2011

I need a command to search a string in a file and then to convert the next string in the same line from hexadecimal to binary. I was able to put everything in capitals. The original file can be as such:

E 2
C 1 794
T ffff
E 2
C 1 787

It is not always FFFF! I am trying to do this in a file at once, not reading line by line (using while).

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved