You are not logged in.

#1 2011-07-13 12:50:40

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 196
Website

[SOLVED] chown: no such group

Something wrong happened with my users group. I can't figure out what it is:

[mk@linux ~]$ chown mk.users /home/mk/6.jpg
chown: wrong user: `mk.users'
[mk@linux ~]$ chown mk:users /home/mk/6.jpg
chown: wrong group: `mk:users'
[mk@linux ~]$ chown mk:100 /home/mk/6.jpg
(that's ok)

[mk@linux ~]$ chown root.root /home/mk/6.jpg
chown: wrong user: `root.root'
[mk@linux ~]$ chown root:root /home/mk/6.jpg
chown: wrong group: `root:root'


/etc/group: http://wklej.org/id/561293/
/etc/passwd: http://wklej.org/id/561294/


http://pliki.netau.net/images/screen23.png

It "works" this way on every file. Thanks for help.

--mod edit: use thumbnails, see https://wiki.archlinux.org/index.php/Fo … s_and_Code

Last edited by mkkot (2011-07-13 15:17:07)

Offline

#2 2011-07-13 13:43:29

karol
Archivist
Registered: 2009-05-06
Posts: 25,425

Re: [SOLVED] chown: no such group

Instead of posting a big screenshot in Polish you can show us the output of

ls -l /home/mk/6.jpg
[karol@black ~]$ touch foo
[karol@black ~]$ ls -l foo
-rw-r--r-- 1 karol users 0 07-13 15:47 foo

Seems pretty normal (you can change the defaults if you like).

Unfortunately I don't know what's wrong.

Offline

#3 2011-07-13 13:46:50

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 196
Website

Re: [SOLVED] chown: no such group

Isn't that big for me tongue (and it shows 100 group instead of users group).

[mk@linux ~]$ ls -l /home/mk/6.jpg
-rw-r--r-- 1 mk 100 16882 2010-12-30  /home/mk/6.jpg
[mk@linux ~]$ touch foo
[mk@linux ~]$ ls -l foo
-rw-r--r-- 1 mk 100 0 07-13 15:46 foo

No idea as well. It worked before. The only thing I did recently is adding mk to wireshark group.

Last edited by mkkot (2011-07-13 13:47:15)

Offline

#4 2011-07-13 13:54:13

karol
Archivist
Registered: 2009-05-06
Posts: 25,425

Re: [SOLVED] chown: no such group

You have 'users::100:' in your /etc/group and I have

[karol@black ~]$ grep users /etc/group
users::100:karol

Try adding your user to the 'users' group.

Offline

#5 2011-07-13 14:01:33

StuBouyer
Member
Registered: 2011-06-28
Posts: 2

Re: [SOLVED] chown: no such group

Have you tried grpck -r?

Looks like some of your groups have been converted to shadow (gshadow) but not all.

Last edited by StuBouyer (2011-07-13 14:03:12)

Offline

#6 2011-07-13 14:01:39

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 196
Website

Re: [SOLVED] chown: no such group

I think you might have wrong. Asked my friend for pasting /etc/group and he also isn't in users. I believe that line in /etc/passwd:

mk:x:1000:100::/home/mk:/bin/bash

states, that 100 (users) group is a base group for user mk.
BTW chown works properly from root.

Last edited by mkkot (2011-07-13 14:02:02)

Offline

#7 2011-07-13 14:06:08

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 196
Website

Re: [SOLVED] chown: no such group

StuBouyer wrote:

Have you tried grpck -r?

Looks like some of your groups have been converted to shadow (gshadow) but not all.

Umm, thanks, I didn't know about gshadow file at all. Here's what it says:

[root@linux mk]# grpck -r
group root has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'bin' group in /etc/group but not in /etc/gshadow
group bin has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group daemon has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group sys has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group adm has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group tty has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'disk' group in /etc/group but not in /etc/gshadow
group disk has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group lp has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group mem has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group kmem has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'wheel' group in /etc/group but not in /etc/gshadow
group wheel has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group ftp has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group mail has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group uucp has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'log' group in /etc/group but not in /etc/gshadow
group log has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group locate has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group smmsp has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group http has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'games' group in /etc/group but not in /etc/gshadow
group games has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'video' group in /etc/group but not in /etc/gshadow
'mk' is a member of the 'audio' group in /etc/group but not in /etc/gshadow
group audio has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'optical' group in /etc/group but not in /etc/gshadow
group optical has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'floppy' group in /etc/group but not in /etc/gshadow
'mk' is a member of the 'storage' group in /etc/group but not in /etc/gshadow
'mk' is a member of the 'power' group in /etc/group but not in /etc/gshadow
group nobody has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
group users has an entry in /etc/gshadow, but its password field in /etc/group is not set to 'x'
'mk' is a member of the 'dbus' group in /etc/group but not in /etc/gshadow
'mk' is a member of the 'hal' group in /etc/group but not in /etc/gshadow
grpck: no changes

Offline

#8 2011-07-13 14:07:05

karol
Archivist
Registered: 2009-05-06
Posts: 25,425

Re: [SOLVED] chown: no such group

mkkot wrote:

I think you might have wrong. Asked my friend for pasting /etc/group and he also isn't in users. I believe that line in /etc/passwd:

mk:x:1000:100::/home/mk:/bin/bash

states, that 100 (users) group is a base group for user mk.
BTW chown works properly from root.

I get it, maybe that's why it shows '100' and not 'users' as the group.

Offline

#9 2011-07-13 14:13:16

StuBouyer
Member
Registered: 2011-06-28
Posts: 2

Re: [SOLVED] chown: no such group

Add 'x' to all the entries in /etc/group that doesn't have them

So that they look like

network:x:90:
video:x:91:mk

Then add 'mk' to all the entries on /etc/ghadow that match /etc/group

In my gshadow some of the enties have 'x' and some have '!', but all entries in /etc/group have 'x'

Offline

#10 2011-07-13 14:40:21

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 196
Website

Re: [SOLVED] chown: no such group

Done. Removed hal group and fixed other minor things, now grpck -r shows empty output. Problem remains the same unfortunately.

/etc/group: http://wklej.org/id/561331/
/etc/passwd: http://wklej.org/id/561333/
/etc/gshadow: http://wklej.org/id/561334/

[mk@linux ~]$ chown mk.users /home/mk/cechy.pdf 
chown: wrong user: `mk.users'
[mk@linux ~]$ chown mk:users /home/mk/cechy.pdf 
chown: wrong group: `mk:users'
[mk@linux ~]$ chown root.root /home/mk/cechy.pdf 
chown: wrong user: `root.root'
[mk@linux ~]$ chown root:root /home/mk/cechy.pdf 
chown: wrong group: `root:root'
[mk@linux ~]$ su
Password: 
[root@linux mk]# chown mk.users /home/mk/cechy.pdf 
[root@linux mk]# ls -l /home/mk/cechy.pdf 
-rw-r--r-- 1 mk users 38296 2010-08-12  /home/mk/cechy.pdf
[root@linux mk]# exit
exit
[mk@linux ~]$ ls -l /home/mk/cechy.pdf
-rw-r--r-- 1 mk 100 38296 2010-08-12  /home/mk/cechy.pdf

//edit: please note that from root's account it shows right group "mk users", and from mk's account it shows "mk 100".

Last edited by mkkot (2011-07-13 14:46:39)

Offline

#11 2011-07-13 15:03:47

mkkot
Member
From: Poland
Registered: 2009-12-20
Posts: 196
Website

Re: [SOLVED] chown: no such group

I can't believe!

[mk@linux ~]$ ls -l /etc/group
-rw------- 1 root 0 557 07-13 16:29 /etc/group
[mk@linux ~]$ ls -l /etc/passwd
-rw-r--r-- 1 root 0 635 07-13 14:30 /etc/passwd
[mk@linux ~]$ ls -l /etc/gshadow
-rw-r--r-- 1 root 0 485 07-13 16:27 /etc/gshadow
su
chmod 644 /etc/group

Works!

Thank you all for the help smile

Last edited by mkkot (2011-07-13 15:17:36)

Offline

Board footer

Powered by FluxBB