LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-07-2013, 02:10 AM   #1
tarok
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Rep: Reputation: Disabled
How do I find the owner of a group?


I created a group and added two users into it. I would like to find out the owner of the group, however I can't find a command for it.
After searching online, I could only find the command that tells me how to find the owner of a file and/or directory.

I tried using the same command, but it doesn't work.
ls -l group name

Thanks!
 
Old 09-07-2013, 02:31 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
What makes you think that a group has an owner? Files have owners and folders have owners but groups?
jdk
 
Old 09-07-2013, 02:31 AM   #3
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387Reputation: 2387
A group doesn't have to have an owner. It doesn't even need any user(s) attached to it.

If you need to know which user(s) are associated with what group(s) you need to check both /etc/group and /etc/passwd. You need to check both files because the user isn't mentioned in /etc/group when this group is the primary group.
 
Old 09-07-2013, 02:35 AM   #4
tarok
LQ Newbie
 
Registered: Sep 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
I'm doing an exercise for my class and it asks me to find out the owner of the group. If groups do not have owners, I will skip that question.

Thanks.
 
Old 09-07-2013, 02:41 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,464

Rep: Reputation: Disabled
Ok, but please be aware of this LQ rule:
Quote:
Do not post homework assignments verbatim. We're happy to assist if you have specific questions or have hit a stumbling point, however. Let us know what you've already tried and what references you have used (including class notes, books, and searches) and we'll do our best to help. Keep in mind that your instructor might also be an LQ member.
Thanks,
jdk
 
Old 09-08-2013, 12:04 PM   #6
rpmacaspac
Member
 
Registered: Jul 2013
Distribution: centos 6
Posts: 48

Rep: Reputation: Disabled
just type in # ll (in the location of the files or folder)

for example: ll will output the following
#ll
total 1
-rw-r--r--. 1 root root 2407466 Feb 22 2013 System.map-2.6.32-358.el6.x86_64
| |
V V
owner group

you can change the group of file by

chgrp 'name of new group' 'file'
for ex.
#chgrp mygroup System.map*
 
Old 09-08-2013, 12:32 PM   #7
273
LQ Addict
 
Registered: Dec 2011
Location: UK
Distribution: Debian Sid AMD64, Raspbian Wheezy, various VMs
Posts: 6,325

Rep: Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730Reputation: 1730
How exactly is the question phrased and what, exactly, are you studying? I ask because the only time I have come across the concept of group owners is using Windows with Active directory. So if you're studying LDAP or SAMBA that might explain things and your question might have a different answer -- though I'm probably not able to answer it.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
which group and which owner ndaka123488 Linux - Software 5 09-20-2011 06:54 PM
Changing owner and group of file surfbass Linux - General 2 12-12-2005 03:25 PM
folder owner/group weird curos Slackware - Installation 1 07-18-2005 08:13 AM
group owner etc MI3GTO Mandriva 3 02-27-2005 09:26 PM
Group as owner instead of a user dtournas Linux - General 1 09-11-2003 11:13 AM


All times are GMT -5. The time now is 03:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration