Groups and their users - please explain
User "alex"
$ groups
disk wheel log network audio optical storage users
So it's in "users" group.
$ cat /etc/group | grep alex
disk:x:6:root,alex
wheel:x:10:root,alex
log:x:19:root,alex
network:x:90:alex
audio:x:92:alex
optical:x:93:hal,alex
storage:x:95:hal,alex
Alex is not in "users" here. Why? If I open "/etc/group", there will be:
users:x:100:
Right. If /etc/passwd says "username:x:1000:100:......." that means username is user #1000 and is a part of group 100. Note that only 1 group can be listed in /etc/passwd. And yes they are automatically in that group. Any additional groups may be given to the user by listing the user in /etc/group.
In the above example, there is no need to add "username" to group 100 in /etc/group, since it is stated in /etc/passwd that "username" belongs to group 100. If you wanted to, you could also list "username" in group 100 in /etc/group, but that is not necessary.
The reason that /etc/passwd has you give a group to the username in /etc/passwd is so that for example if i were to make a new file, it would set the new file's ownership to my username and the group given to me in /etc/passwd. In the above example, if i were to make a new file (with the user "username" as shown above with group #100 (users) in /etc/passwd), then the new file would by default belong to "username" and to group "users".
So to answer your question simply: yes the user is automatically added to the group given in /etc/passwd. And therefore there is no need to type the username in /etc/group. You can if you want to, but there is no need to. And one reason that there is a group listed in /etc/passwd rather than having it all done through /etc/group is so that when you make a file, it knows what group owns it by default.
Similar Messages
-
Web groups and corresponding users
Hi All,
just want to know if there is a way to get the list of webcat groups and corresponding users in a report/excel sheet?
I know we can create reports using catalog manager but they don't have users/ groups fields in it..
Let me know your thoughts!
Regards,
VenkataHey Turribeach,
I have been following your posts and I know that you don't like giving step by step instructions.
Is there a similar kind of example in any of the blogs? I searched in google and came across venkat Krishna blog and one other blog.
but it was not explained that well. I am a newbie to java and .net as well. So, i am having some trouble implementing this.
Can you please guide me in a brief way? Thanks for your help.
Regards,
Venkata. -
Using PowerShell 3.0 (And if possible the CIM, not WMI cmdlet), how can I script with | out-file C:\<filename>.txt or .csv option to list all local user accounts & local groups
on remote computers?
Thank You!I don't recall PowerShell V3 introducing anything new to handle local users and groups. You need to use PowerShell V1 methods, using the [ADSI] accelerator and the WinNT: provider. The scripts linked above show this. No need to use WMI (which would probably
be slower).
Here is a script I've used to enumerate all local groups and their members:
$Computer
= "MyServer"
$Computer =
[ADSI]"WinNT://$Computer"
$Groups =
$Computer.psbase.Children | Where {$_.psbase.schemaClassName
-eq "group"}
ForEach ($Group
In $Groups)
"Group: "
+ $Group.Name
$Members
= @($Group.psbase.Invoke("Members"))
ForEach ($Member
In $Members)
$Class
= $Member.GetType().InvokeMember("Class",
'GetProperty', $Null,
$Member, $Null)
$Name
= $Member.GetType().InvokeMember("Name",
'GetProperty', $Null,
$Member, $Null)
"-- Member: $Name ($Class)"
A similar script to enumerate all local users would be:
$Computer
= "MyServer"
$Computer =
[ADSI]"WinNT://$Computer"
$Users =
$Computer.psbase.Children | Where {$_.psbase.schemaClassName
-eq "user"}
ForEach ($User
In $Users)
"User: "
+ $User.Name
Richard Mueller - MVP Directory Services -
There was a problem amounts will be deducted from my account since January repeatedly and large amounts please explain and return amounts if taken unjustly
This is a User to User Forum.
To Contact iTunes Customer Service and request assistance
Use this Link > Apple Support iTunes Store Contact -
What is difference between user group and reference user group?
hi
guys,
what is difference between user group and reference user group?
your regards
p.sureshHi ,
Chk the link below for your clarifiacation.
http://help.sap.com/erp2005_ehp_03/helpdata/EN/5c/c1c81c445f11d189f00000e81ddfac/frameset.htm
Hope it helps.
Regards,
Amit
Edited by: Amit Kotwani on Sep 2, 2008 2:15 PM -
SQL Query to get All AD Groups and its users in Active Directory
Hi,
Is there any query to get all AD groups and its user in an instance of a SQL server?Check this blog.
http://www.mikefal.net/2011/04/18/monday-scripts-%E2%80%93-xp_logininfo/
It will give you more than what is required. If you dont want the extra information,then you can try this.. I took the query and removed the bits that you might not require.
declare @winlogins table
(acct_name sysname,
acct_type varchar(10),
act_priv varchar(10),
login_name sysname,
perm_path sysname)
declare @group sysname
declare recscan cursor for
select name from sys.server_principals
where type = 'G' and name not like 'NT%'
open recscan
fetch next from recscan into @group
while @@FETCH_STATUS = 0
begin
insert into @winlogins
exec xp_logininfo @group,'members'
fetch next from recscan into @group
end
close recscan
deallocate recscan
select
u.name,
u.type_desc,
wl.login_name,
wl.acct_type
from sys.server_principals u
inner join @winlogins wl on u.name = wl.perm_path
where u.type = 'G'
order by u.name,wl.login_name
Regards, Ashwin Menon My Blog - http:\\sqllearnings.com -
How to delete everything, but base group and their depends?
If I install KDE or Gnome, and even a bunch of different programs, or have too much broken system, or even what the cause ..
How to easiest delete everything, but to keep packages in base group and their depends?
Last edited by atommixz (2010-10-14 11:37:31)You're drawing an erroneous conclusion. Dependencies for base are self contained within base. That is to say, you can install only the packages in base, and boot into a working system.
If it's not working, then it gives rise to the idea that you have packages outside of the base group that are providing the functionality of packages in base. I'm not willing to test this further than verifying what I think the output of the comm should be -- and it looks correct on my end. -
Enqueue and Dequeue consept----Please explain urgent
hi all,
i want to use sap locking mechanisn (Enqueue and dequeue consept) while updating database table....please explain how to use this while updating a database table.
Thanks in advance
Nandha kumarNandha,
Good document on this concept..
Activating a lock object in the ABAP Dictionary automatically creates function modules for setting (ENQUEUE_<lock object name>) and releasing (DEQUEUE_<lock object name>) locks.
The generated function modules are automatically assigned to function groups. You should not change these function modules and their assignment to function groups since the function modules are generated again each time the lock object is activated.
Never transport the function groups, which contain the automatically generated function modules. The generated function modules of a lock object could reside in a different function group in the target system. Always transport the lock objects. When a lock object is activated in the target system, the function modules are generated again and correctly assigned to function groups.
Parameters of the Function Modules
Field Names of the Lock Object
The keys to be locked must be passed here.
A further parameter X_<field> that defines the lock behavior when the initial value is passed exists for every lock field <field>. If the initial value is assigned to <field> and X_<field>, then a generic lock is initialized with respect to <field>. If <field> is assigned the initial value and X_<field> is defined as X, the lock is set with exactly the initial value of <field>.
Parameters for Passing Locks to the Update Program
A lock is generally removed at the end of the transaction or when the corresponding DEQUEUE function module is called. However, this is not the case if the transaction has called update routines. In this case a parameter must check that the lock has been removed.
Parameter _SCOPE controls how the lock or lock release is passed to the update program (see The Owner Concept for Locks). You have the following options:
_SCOPE = 1: Locks and lock releases are not passed to the update program. The lock is removed when the transaction is ended.
_SCOPE = 2: The lock or lock release is passed to the update program. The update program is responsible for removing the lock. The interactive program with which the lock was requested no longer has an influence on the lock behavior. This is the standard setting for the ENQUEUE function module.
_SCOPE = 3: The lock or lock release is also passed to the update program. The lock must be removed in both the interactive program and in the update program. This is the standard setting for the DEQUEUE function module.
Parameters for Lock Mode
A parameter MODE_<TAB> exists for each base table TAB of the lock object. The lock mode for this base table can be set dynamically with this parameter. Valid values for this parameter are S (shared), E (exclusive) and X (exclusive but not cumulative).
The lock mode specified when the lock object for the table is created is the default value for this parameter. This default value can however be overridden as required when the function module is called.
If a lock set with a lock mode is to be removed by calling the DEQUEUE function module, this call must have the same value for the parameter MODE_<TAB>.
Controlling Lock Transmission
Parameter _COLLECT controls whether the lock request or lock release should be performed directly or whether it should first be written to the local lock container. This parameter can have the following values:
Initial value: The lock request or lock release is sent directly to the lock server.
X : The lock request or lock release is placed in the local lock container. The lock requests and lock releases collected in this lock container can then be sent to the lock server at a later time as a group by calling the function module FLUSH_ENQUEUE.
Behavior for Lock Conflicts (ENQUEUE only)
The ENQUEUE function module also has the parameter _WAIT. This parameter determines the lock behavior when there is a lock conflict.
You have the following options:
Initial value: If a lock attempt fails because there is a competing lock, the exception FOREIGN_LOCK is triggered.
X : If a lock attempt fails because there is a competing lock, the lock attempt is repeated after waiting for a certain time. The exception FOREIGN_LOCK is triggered only if a certain time limit has elapsed since the first lock attempt. The waiting time and the time limit are defined by profile parameters.
Controlling Deletion of the Lock Entry (DEQUEUE only)
The DEQUEUE function module also has the parameter _SYNCHRON.
If X is passed, the DEQUEUE function waits until the entry has been removed from the lock table. Otherwise it is deleted asynchronously, that is, if the lock table of the system is read directly after the lock is removed, the entry in the lock table may still exist.
Exceptions of the ENQUEUE Function Module
FOREIGN_LOCK: A competing lock already exists. You can find out the name of the user holding the lock by looking at system variable SY-MSGV1.
SYSTEM_FAILURE: This exception is triggered when the lock server reports that a problem occurred while setting the lock. In this case, the lock could not be set.
If the exceptions are not processed by the calling program itself, appropriate messages are issued for all exceptions.
Reference Fields for RFC-Enabled Lock Objects
The type of an RFC-enabled function module must be completely defined. The parameters of the generated function module therefore have the following reference fields for RFC-enabled lock objects:
Parameters
Reference fields
X_<field name>
DDENQ_LIKE-XPARFLAG
_WAIT
DDENQ_LIKE-WAITFLAG
_SCOPE
DDENQ_LIKE-SCOPE
_SYNCHRON
DDENQ_LIKE-SYNCHRON
Pls. reward if useful -
Hi All,
I like to keep track of Groups and Users added into our Domain Admins. Yes, it should always be minimal, but if I can have a daily report just to be certain, I'll sleep better.
The following works just fine if there is a single nested group. I cannot get it to work properly if there is more than one. I'm hoping you'll see what I'm missing.
Works fine:
$admins = get-adgroupmember "domain admins"
foreach($i in $admins){if($i.objectClass -eq "group"){ get-adgroupmember $i.samaccountname |foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($i.name)}} | select username,group | export-csv c:\Users_and_Groups.csv -Notypeinformation}}
Does not work well. Result is that the "Group" information doesn't change to the correct group:
$myCol=@()
foreach($admin in $admins){if($admin.objectClass -eq "group"){$myCol+=$admin.samaccountname}{foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group
| export-csv c:\Users_and_Groups.csv -Notypeinformation}}}
Here is what I have in $myCol:
PS C:\Users\Administrator> $myCol
MarketingPSO
RMSysAdmins
I tried shortening up the one-liner a bit more, but for some reason the "RMSysAdmins" is the only Group listed even though Leia and Han are in the MarketingPSO Group:
foreach($i in $myCol){get-adgroupmember $i | foreach {New-Object PSObject -Property @{ username = $_.name;Group = $($admin.name)}} | select username,group }
username
Group
Leia Organa
RMSysAdmins
Han Solo
RMSysAdmins
c3po
RMSysAdmins
Darth Vader
RMSysAdmins
Boba Fett
RMSysAdmins
Thank you very much for your time,
Mr MisterHi Mr Mister,
To get nested group members, this script is for your reference:
function Get-ADNestedGroupMembers {
[cmdletbinding()]
param ( [String] $Group )
Import-Module ActiveDirectory
$Members = Get-ADGroupMember -Identity $Group|sort-object objectClass -descending
$members | % {
if($_.ObjectClass -eq "group") {
Get-ADNestedGroupMembers -Group $_.samaccountname
} else {
New-Object PSObject -Property @{ username = $_.name;Group = $Group }}
Get-ADNestedGroupMembers "groupname"
If there is anything else regarding this issue, please feel free to post back.
Best Regards,
Anna Wang
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected] -
How to create groups and assign users thru program
Hi,
I am planning to create groups by program and assign users to them based on some condition.Once users are assigned to those groups we need to change the Language value for those users in User profile
We are using Central User Administration.
Please let me know the solution
Thanks
Bala Duvvuriprobably you can use this code to create a group
IGroupFactory groupFact = UMFactory.getGroupFactory();
IGroup group = groupFact.newGroup(wdContext.currentContextElement().getGroup());
group.commit();
for this required com.sap.security.api.jar -
How to get list of groups and the users from OID
Hi,
Can someone please tell me how to get the list of GROUPS and all the USERS in each group in OID using Java. Need to recursively get all the Groups and Users in each group using Java any samples.
Thanksuse examples from OTN like
http://www.oracle.com/technology/sample_code/products/jdev/readmes/samples/ldapdatacontrol/ldapapplication/src/dc/ldap/model/LDAPSearch.java
and modify it to your needs
Bernhard -
Can not create a group and new users
Good afternoon, colleagues. it is impossible to create a new group and user Pomoz exchange. When trying to select a unit search unit freezes. The logs an error. I do not understand that and what to do. Prompt please. Exchange 2013 and Windows server 2013.
Current user: 'Domain/Company/Emploees/TestUser'
Web service call 'https://exchange.domain:444/ecp/DDI/DDIService.svc/GetList?reqId=905048&schema=OrganizationalUnitPicker&msExchEcpCanary=VVsOZo1K90K_uKYTCFp2jYhxN2V-3dAIUvbEO3KxoMWlqNJV8dPZMZYp4YB7VQ88iXbFzoGR-sI.(https://exchange.domain.ru/ecp/DDI/DDIService.svc/GetList?reqId=905048&schema=OrganizationalUnitPicker&msExchEcpCanary=VVsOZo1K90K_uKYTCFp2jYhxN2V-3dAIUvbEO3KxoMWlqNJV8dPZMZYp4YB7VQ88iXbFzoGR-sI.)' failed with the following error:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Exchange.Management.DDIService.OrganizationalUnitPickerService.BuildOUTree(DataTable dataTable)
at Microsoft.Exchange.Management.DDIService.OrganizationalUnitPickerService.GetListPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store)
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Exchange.Management.DDIService.Activity.DoPostRun(DataRow input, DataTable dataTable, DataObjectStore store, Type codeBehind)
at Microsoft.Exchange.Management.DDIService.Workflow.Run(DataRow input, DataTable dataTable, DataObjectStore store, Type codeBehind, UpdateTableDelegate updateTableDelegate)
at Microsoft.Exchange.Management.DDIService.WSListDataHandler.ExecuteCore(Workflow workflow)
at Microsoft.Exchange.Management.DDIService.WSDataHandler.Execute()
at Microsoft.Exchange.Management.DDIService.DDIServiceHelper.GetListCommon(DDIParameters filter, SortOptions sort, Boolean forGetProgress)
at SyncInvokeGetList(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at Microsoft.Exchange.Management.DDIService.Activity.DoPostRun(DataRow input, DataTable dataTable, DataObjectStore store, Type codeBehind)
at Microsoft.Exchange.Management.DDIService.Workflow.Run(DataRow input, DataTable dataTable, DataObjectStore store, Type codeBehind, UpdateTableDelegate updateTableDelegate)
at Microsoft.Exchange.Management.DDIService.WSListDataHandler.ExecuteCore(Workflow workflow)
at Microsoft.Exchange.Management.DDIService.WSDataHandler.Execute()
at Microsoft.Exchange.Management.DDIService.DDIServiceHelper.GetListCommon(DDIParameters filter, SortOptions sort, Boolean forGetProgress)
at SyncInvokeGetList(Object , Object[] , Object[] )
at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs)
at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc& rpc)
at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Exchange.Management.DDIService.OrganizationalUnitPickerService.BuildOUTree(DataTable dataTable)
at Microsoft.Exchange.Management.DDIService.OrganizationalUnitPickerService.GetListPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store)
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.Exchange.Management.DDIService.OrganizationalUnitPickerService.BuildOUTree(DataTable dataTable)
at Microsoft.Exchange.Management.DDIService.OrganizationalUnitPickerService.GetListPostAction(DataRow inputRow, DataTable dataTable, DataObjectStore store)
Help me (Hi,
I would like to verify which group you are creating, distribution group or security group? What's more, please take your time to post the cmdlets you used for my further research.
Here are some helpful articles for your reference.
Manage Distribution Groups
http://technet.microsoft.com/en-us/library/bb124513(v=exchg.150).aspx
Manage Mail-Enabled Security Groups
http://technet.microsoft.com/en-us/library/bb123521(v=exchg.150).aspx
Hope it helps.
Best regards,
Amy
Amy Wang
TechNet Community Support -
Keeping Groups and their Details together when printing a report
So I created my Groups...[Claim #], [Rec #], [Line #], and [Service_Date] and set the Group Properties Page Break and checked
Between each instance of a group. I also made the
Keep Together property to True for all my Row groups and details then.
When I run in Preview it looks PERFECT!. Then when I actually go to print the report, the grouping is printing on one page and the details on the following page. This is unacceptable.
Then I Googled and found this...
https://connect.microsoft.com/SQLServer/feedback/details/428595/keep-together-property-not-working-in-ssrs-2008
Which makes it seems as though the Keep Together Property has a bug. Unless the
Keep Together implies in Report Design View. But it does say
KeepTogther Indicates whether to keep all sections of the data region together on one page. Yeah...but "page" meaning viewable page or printable page...
I also found this work around which I really don't understand as to what I'm supposed to do.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/692d85d3-87fe-483f-8267-98213795ef1e/third-major-flaw-with-reporting-services?forum=sqlreportingservices
Has anyone else experienced this issue? Is this still a problem in SSRS? And can anyone please help me with the work around?
Thanks in advance and am hopeful for a reply.
ITBobbyP85Hi ITBobbyP,
According to your description, you have Groups [Claim #], [Rec #], [Line #], and [Service_Date] in the report, and added Page Break to the groups. The report looks normal when you preview it, but when you go to print the report, the groups displayed on one
page and the details on the following page.
Based on my knowledge, the issue is due to report size. Page orientation of report is Portrait(8.5in X 11in). If the width of tablix is larger than report page, the groups and details will be displayed on different pages. In this case, we need to change
paper size to a certain value, please refer to the following steps:
Right-click outside of the report body and click Report Properties.
In Page Setup, select a value from the Paper Size list. Each option populates the Width and Height properties. You can also specify a custom size by typing numeric values in the Width and Height boxes. Click OK.
For more information about setting page size, please refer to the following document:
https://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/10/30/ssrs-using-page-size-and-interactive-size-to-manage-printing.aspx
If you have any questions, please feel free to let me know.
Best Regards,
Wendy Fu -
Mac and Linux Users Please tell me if you can turn on webcams here
Mac and Linux users who have the latest versions of Flash installed, please tell me if you can turn on webcams on this website that we are developing
www.instadates.com/chat/
Press enter and click on Turn on Webcam button.
The webcams work perfectly fine in Windows 7, but I do not have a Mac and do not know how to update my flash on linux mint 11.I apologize...I did not put the correct link above. Now its fixed.
-
LMS4 - overview about all devices and their user defined groups
Hello,
How is it possible to generate a report to get an overview wheather all devices matches in their intended user defined groups?
For instance this style:
name mgmt-ip user-defined-group-name
Cant find OGS attributes in report generator.
thx for hints, SteffenDo publish the rules you use to get he devices.
What is the parent group of your devices
Cheers,
Michel
Maybe you are looking for
-
i have a web application using struts deployed under tomcat server i have another web application(based onservlets) deloyed under jboss both of them have their respective login pages. i am accessing the login page of 2nd application by giving its loc
-
Images and titles are not showing up
I took a screen shot of it, but when I load tumblr and reddit specifically, but there are other pages, smaller images and title do not show up. I tried the trouble shooting, and the reset, and looked at extensions. Nothing worked, I still have the pr
-
How to remove text without destroying the picture?
I am new in photoshop and I am trying to remove the text down of the picture so that I can add another one. Is watermark, I have seen sosme videos on Youtube but seems didn't work so well to me. If someone can help how to do delete that text and add
-
Hi, I have a client Java application accessing a session EJB in a remote JBoss J2EE server. I'm using JWS 1.2 to deploy my application but when I do a JNDI lookup to get access the the remote's object home interface I get this error: "Need to specify
-
Working on a PC with PS5. Why are RAW files automatically being converted to JPGs when opened in PS5? I want them to stay RAW files until I've processed them, then I will export them as JPGs. What is happening?