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


ADVERTISEMENT

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

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

Ubuntu Servers :: Groups: Cannot Find Name For Group ID 10000

Feb 5, 2011

I've installed OpenLDAP and libnss-ldap, as instructed in this tutorial. Then I try to login but I got the error

Code:

groups: cannot find name for group ID 10000

Here's the user and group ldif entry that I use to login

Code:

dn: uid=iwan,ou=people,dc=example,dc=com
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: shadowAccount

[code]....

View 7 Replies View Related

Server :: Samba Shares And The Notion Of Group Of Groups

Feb 9, 2011

this is really a brainstorming thread seeking advise on how to setup some samba shares within a small office network. For the quick judgers:

-no I'm not an IT expect and I'm not even the IT at the office, I just fill in this gap too.
-I have looked into several samba 'by example' tutorials - none seems to fit my needs or answer some of my Qs.

So I seek advise from your experience: What do I know:

-the functionality of the setgid to have subfolders inherit the group owner of the parent folder
-the fact that I don't want samba in 'share' level in order to register the owners of files
-the functionality of acls that enables inheritance of rwx permissions to subfoldrs of a parent folder.
- the groupmod -o option but that doesn't help apparently.

So this is a 25ppl civil engineer consulting office. The physical groups of ppl working here are: engineers, drafters (those who generate the drawings , i'm not sure if thats the correct term), and secretaries. The job usually is done in the following way, once a project commences a project folder gets generated and everything is done in there. incoming mail arrives there (secretaries put it there), engineers do they calculations on speadsheets, write reports and do draft drawings and, finally, drafters take the draft drawings and finalize them. So pretty much everyone of these 3 groups needs write access to the main project folder.

How do I accomplish that? as which group should I create the project folders? It came to mind the notion of group of groups. Now that the actual owner of the file is not so important anymore (several engineers will need to have write access to the folder) and group becomes important, it would be nice to have the ability to add... groups (instead of users) to groups! so that the permissions to a group are inherited by its children groups... Does such functionality exist of can it be implemented somehow?

How do I go about giving access to everyone and at the same time, NOT giving up on the 'user' secutiry level of samba (and NOT just giving rwx permission to 'others'? Is it possible? or Should I instead forget about individuals and match the 'physical groups' to 'linux users' and 'groups of groups' to 'linux groups'? ( This means I should give on ownership of files by individuals )? Since its a small office some work is mixed - engineers might pickup incoming email, a secretary might do abit of drafting work etcetc.

View 4 Replies View Related

Server :: Define A Global Group Made Up Of Other Groups In LDAP?

Apr 13, 2011

I'm trying to create a group called Domain Users, that will include several other groups that are populated with users inside of the LDAP database. In the LDAPdatabase, for a group entry, there are memberUid entries that can be filled. When I try to use another "Group" name, it just lists that name and not the people in that group. So if group "A" has Jim, John, Sue, and I include group "A" in the memberUid of the Domain Users group, I want that to reference the people in that group, not the group name. Testing access right, having the group name listed in "Domain Users" group, does not grant user access under the group rights on a directory. Should be simple, but I don't know the syntax to use for this reference.

View 2 Replies View Related

Security :: Set Permissions For Multiple Groups To Have Different Levels Of Access To One Group Of Files?

Feb 5, 2010

I am setting up a samba server to operate in a windows AD domain. I want to set permissions for multiple groups to have different levels of access to one group of files, and it looks to me like unix permissions will not do that? I always hear about how robust linux is, and it seems to me that their file permissions model is WEAK compared to microsoft's?

View 2 Replies View Related

Server :: Ownership For Multiple Groups To A Single Share?

Feb 4, 2010

I have configured a file server with samba and winbind in RHEL5.I am able to allot permission for the active directory groups to my Linux folder.No issues.But i want to set multiple groups of active directory to get ownership to a single directory. Say there are 3 groups a,b,c to have permissions to a folder of the Linux machine.

Code:

chown -R root:Active_directory_group_name path_to_linux directory

I have set

Code:

chmod 770 /myshare

meaning that user and group would have full rights to /myshare

Code:

chown root:a

works great I tried with the option of

Code:

chown -R --reference=/etc/shares_own.txt /myshare

In reference file(shares_own.txt) i gave the entry as

Code:

root:a,b,c

This is not working.

View 7 Replies View Related

Ubuntu :: After Installing VirtualBox, Add To The Vboxusers Group In System -> Administration -> Users And Groups?

Oct 24, 2010

After installing VirtualBox, add yourself to the Vboxusers group in System -> Administration -> Users and Groups.Then re-boot your computer!Otherwise you will spend hours (like me) wondering why your USB devices are not available in your guest VM.I just did a complete install on a new, larger hard drive and had forgotten this simple fact. Doh!

View 2 Replies View Related

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 View Related

Programming :: Connect Multiple Sockets From A Single Client To A Single Server And Keep Them Open?

Oct 13, 2010

I have question about the UNIX sockets. my goal is to connect multiple sockets from a single client to a single server and keep them open...I'm not sure if that is possible to create or not. Do you have any suggestion or an example of code?

View 1 Replies View Related

Ubuntu :: Create Users And Groups By Using CLI Tools?

May 7, 2010

How do you create users and groups by using CLI tools?

View 1 Replies View Related

Software :: Shadow Doesn't Work - Can't Create New Users Or Groups

Nov 21, 2010

I've compiled the latest version of shadow (without PAM and selinux support), but I can't create new users or groups. I don't even get a error.

It's just like:
bash-4.1# useradd -d DIR -u NUMBER USER
bash-4.1#

but if i take a look at the /etc/passwd or /etc/shadow file there's no entry.

View 5 Replies View Related

Ubuntu Servers :: Get A List Of Both The Local Groups And The Groups In The Active Directory?

Feb 4, 2011

I already know of a work around to fix this problem, but I guess my question is why is this not working as expected? I am using a Windows Server 2008 R2 Active Directory for authentication.

I have run auth-client-config for the ldap profile and pam-auth-update. When running getent passwd, I get a list of both the local users and the users in the active directory (with populated information in the Unix schema extension). When running getent group I get a list of both the local groups and the groups in the active directory (with populated information in the Unix schema extension).

Interestingly enough, though, when I run su DOMAINUSER, after the prompt for the password I get an authentication error. In /var/log/auth.log I can see an entry with pam_ldap: missing "host" in file "/etc/ldap.conf". The SRV records in the DNS servers resolve correctly. I've checked this with nslookup and I have seen the records within my zone file. Obviously if the ldap.conf file is working with getent and the ldap server is resolving from the SRV records, it is working fine.

The interesting part is that the Windows Server 2008 R2 AD machine shows in the event viewer that there was a successful authentication, yet the Ubuntu box says no. When I add the host within the ldap.conf file, everything works...getent and the actual authentication, either initial login or su.

[Code]...

View 1 Replies View Related

Ubuntu Servers :: Mapping UNIX Groups To Windows Groups?

Oct 12, 2010

I am currently trying to set up a Samba domain server. In the Samba-HOWTO-Collection I found an
example file.(Point 3.3.3.1) In the explanations of the example below, the author says I need to map UNIX Groups to NT Groups. He writes a shell-script of how one could do it, but when I copy it and then execute it, I get the error:

Bad option: rid=512
Bad option: rid=513
Bad option: rid=514

The other groups do get mapped, just the Domain Admins, Domain Users and Domain Guests dont. This is the shell from the HOWTO:

#!/bin/bash
#### Shell-Skript f ̈r sp ̈tere Verwendung aufbewahren
net groupmap modify ntgroup="Domain Admins" unixgroup=ntadmins rid=512
net groupmap modify ntgroup="Domain Users" unixgroup=users rid=513
net groupmap modify ntgroup="Domain Guests" unixgroup=nobody rid=514

[Code]...

View 2 Replies View Related

General :: Group Files And Create Archives Accordingly?

Jul 20, 2010

How can I group files and create archives accordingly? I have 10,000 files in a folder (no sub-folders) and I want to create 10 zip or tar.gz archives. This means every archive has 1,000 files. How can I do this in Linux?

View 1 Replies View Related

Programming :: Set Supplementary Groups Of Process?

Mar 20, 2010

Unfortunately the setuid() function from unistd.h does not effect the supplementary group ids of the process. Is there a way to set them directly? Even better, is there a setuid() equivalent which also sets the process's supplementary gid's to match the user's?

View 2 Replies View Related

General :: LFS /tools/bin/groups Not Displaying Supplementary Groups?

Jun 8, 2010

So i am at the stage of about to install the basic system and am using a derivation of the package management provided by Matthias S. Benkmann. To this end I am using his useradd and groupadd scripts to update the files:

/etc/passwd
/etc/group

My issue is that when I run the commands(created as part of temporary system when installing coreutils):

Code:

/tools/bin/su linux
#then as user
/tools/bin/groups

(here linux is the name of the user) This only returns the user being in the group named after user but not the additional group of 'install' Also, prior to logging in as user, if I use this command as root:

Code:

/tools/bin/groups linux

linux install This then returns that the user is in the correct groups. Lines from relevant files look like:

Code:

#/etc/passwd
linux:x:10000:10000::/usr/src/build:/bin/bash
#/etc/group

[code].....

View 8 Replies View Related

Fedora Installation :: I2O Controller - No Volume Groups Found Volume Group "VolGroup00" Not Found Unable To Access Resume Device

Apr 8, 2009

Dual PII 400, 512Mb with a Promise SuperTrak 100 IDE Array Controller. At present I have only one drive on the controller, configured for 1 JBOD array. I install FC9 with no problem. New partition is created and formatted, Grub is installed, and then... Grub is found and booted, but then I get:

Reading all physical volumes. This may take a while... No volume groups found Volume group "VolGroup00" not found Unable to access resume device (/dev/VolGroup00/LogVol01) mount: could not find filesystem '/dev/root' I can boot in rescue mode, chroot to the installed system. I changed the kernel boot parm "root=/dev/VolGroup00/LogVol00"

View 2 Replies View Related

Software :: Cannot Create New User (useradd: Unknown Group MyGroup)

Jun 7, 2010

I try to add a new user but got error (shown in title). Is it possible to create a new user and create a new group at the same time? Or should I create the new group first then the new user?

View 1 Replies View Related

General :: Create A Single Partition

Nov 9, 2010

Im following an installation guide (Oracle ASM) which requires me to create a partition on the disk and gives the following example: Code: fdisk /dev/mapper/< alias >kpartx /dev/mapper/< alias >< partition > Im struggelling what <alias> and <partition> need to be substituted for, I have tried to look this up but all that is returned are bug fixes etc generally things that dont make much sense to a newbie like me.

View 8 Replies View Related

Ubuntu Networking :: Create A Single User ISP Over DSL?

Oct 28, 2010

I have a good question. I have a friend that lives in an area where he cannot receive DSL or Cable internet. He has a phone line, and physically able to get DSL, but the company won't give him service. He has Verizon wireless, but the reception is bad and his service gets dropped too much.

I however, have DSL 3.0Mbps and want to know how I could get him a DSL modem to dial up to my server at my house and receive internet. I know that I would probably need two phone lines to do this, but apart from that.

View 2 Replies View Related

CentOS 5 Networking :: Create A Single VPN Connection

Jul 28, 2010

I have just taken on a dedicated server sitting somewhere in Norfolk. I have created a website that uses PHP to connect to another remote server in order to interrogate a MSSQL database. This script, running on Apache, uses a VPN connection to connect to the remote server.To test, I have Apache on my laptop at home and just used Microsoft Network Connection to create the VPN connection.I have now uploaded this site to my new CentOS server and need to create the same VPN connection. I understand this is a command level and have been advised to use OpenVPN which I have successfully installed.My problem is I only have the details remote ip address, username and password. I believe I have to use the 'client.conf' script instead of server.conf.

View 1 Replies View Related

Programming :: Unix Programming - Single Thread Server Can Support Exactly 2 Clients At Once

Sep 28, 2010

A simple TCP based chat server could allow users to use any TCP client (telnet, for example) to communicate with each other. For this question you should consider a single process, single thread server that can support exactly 2 clients at once, the server simply forwards whatever is sent from one client to the other (in both directions). Your server must not insist on any specific ordering of messages as soon as something is sent from one client it is immediately forwarded to the other client. As soon as either client terminates the connection the server can exit

View 4 Replies View Related

Programming :: Unix Programming - Single Process That Does Not Start Up Any Other Threads

Sep 28, 2010

i want a process that can operate as both a TCP echo server and a UDP echo server. The process can provide service to many clients at the same time, but involves a single process that does not start up any other threads.

View 3 Replies View Related

CentOS 5 Server :: Cannot Create Groups In Directory Server?

Feb 25, 2010

I have a centos 5.4 64-bit machine. I installed the directory server following those steps.
I then added some users using the Centos Management Consolecentos-idm-console -a http://localhost:3890 &

View 3 Replies View Related

Debian :: Cannot Create Folder With Single Capital Word / Letter

Mar 20, 2011

i'm trying to make a folder on fat32 partition named NEW by typing in console mkdir NEW, then i open PCMan file manager then go to that folder at first the folder name was NEW but after i doubleclick it and go back the folder name was changed to 'new'then i tried to rename it to NEW but it says file exist then i tried to rename it to 'not new' (this time inside PCMan) and it work then i rename it again to NEW, go into that folder and go back again... the folder name changed to 'new' again.anyone know why this happen?? this doesn't happen if i make the folder name more than one word such as 'NEW NEW'

View 2 Replies View Related

General :: Create A Video DVD With Multiple Titles From A Single-titled DVD?

Apr 24, 2010

I have an unencrypted DVD that is one big title, ie you cannot skip next / prev. What I want to do is reauthor the DVD with title at certain points, so that I can skip next / prev when watching it.

I'm using Ubuntu 8.10

View 1 Replies View Related

Ubuntu :: Create A Single Logical Drive Out Of Two Physical Drives?

Mar 4, 2010

I'm installing Ubuntu to be used as an NFS storage server for my VMWare ESX servers. I've got a server that has two 2TB drives in it. The hardware raid controller isn't an option because it only sees up to 1TB of each drive. So, I'm trying to figure out to do this using either LVM or Parted. I don't know much about doing this, and LVM was the first thing I tried but it didn't seem to do much. It looks like it just created a smaller partition to install Ubuntu on. It didn't ask me what I wanted to do with the rest of the drive space. I've messed around with Parted and am not sure what to do, to be honest. I found a few blog posts but most started off assuming that I knew how to get to where they were starting from.

It's just two drives, /dev/sda /dev/sdb

View 3 Replies View Related

CentOS 5 :: Create New User And Give Single Folder Ftp Access?

Sep 28, 2010

What is the command I need to create a new user and give the user only permission to a single folder via ftp?

View 3 Replies View Related







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