"groupmems" command result unclear

Asked by MehmetBasaran

I cant understand this issue im not sure its normal or not, but im sure its not a smoot.
Im trying group mem without sudo like that
"groupmems -g sudo -l"
return me this result
'groupmems: cannot open /etc/gshadow'

its not clear why u cannot open ?
I thinking must be print Permission denied because this user dosnt have read privilages gshadow.

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu shadow Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

If you prefix with sudo does it work OK?

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#2

https://ostechnix.com/find-sudo-users-linux-system/

Shows users in sudo. You can add and remove users from groups using usermod

Revision history for this message
MehmetBasaran (altinpark) said :
#3

yes if im using prefix sudo its working

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#4

Then great. You are querying users and normal users cannot do this. Adding sudo gives the command the access it needs to work

Revision history for this message
Manfred Hampl (m-hampl) said :
#5

You are complaining that you get the error message
groupmems: cannot open /etc/gshadow
instead of a message like
groupmems: /etc/gshadow: Permission denied

What is the difference?

If you deem this problem severe enough, then you are free to create an issue at the upstream source, https://github.com/shadow-maint/shadow/issues

Can you help with this problem?

Provide an answer of your own, or ask MehmetBasaran for more information if necessary.

To post a message you must log in.