Operating System - Linux
1821537 Members
2640 Online
109633 Solutions
New Discussion юеВ

Suse Linux - groupdel command gives error

 
Venkatesan_5
Frequent Advisor

Suse Linux - groupdel command gives error

Hi,

I am using Suse Linux
SUSE Linux Enterprise Server 10 (x86_64)
VERSION = 10
PATCHLEVEL = 2

While adding group using the command: groupadd -u 50001 test
it adds the entry to the group file

but while deleting using command : groupdel test
it says unkown group 'test'

I tried this option for deleting:
groupdel -P /etc test

It suceeds and deleted the group.

I would like to know why it works with -P option and why it didn't worked without -P..?

Is it searching for any passwd or shadow files else where instead of /etc folder?

Thanks in Advance.

Venkatesan.

6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: Suse Linux - groupdel command gives error

Shalom,

It is probably a software flaw in the groupdel command. Check the man page, you also might not be using sufficiently precise syntax.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Venkatesan_5
Frequent Advisor

Re: Suse Linux - groupdel command gives error

Hi Steve,
I have used the right syntax to add. The same issue happens even while adding a user. It would say useradd: Unknown group `groupname`.

In general its not reading /etc/group file.

In all scenarios, if we use -P /etc it succeeds.
Steven E. Protter
Exalted Contributor

Re: Suse Linux - groupdel command gives error

If it walks like a bug and it talks like a bug, it probably is a bug. Might want to check Novell's bug database on this server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: Suse Linux - groupdel command gives error

>>groupadd -u 50001 test

Hopefully you actually did 'groupadd -g 50001 test' as there is no '-u' option to group add.

I did a groupadd and a groupdel on my SLES 10 SP2 server and it worked fine.

[ root@fllas01:/root ]
# groupadd -u 50001 test
Try `groupadd --help' or `groupadd --usage' for more information.
[ root@fllas01:/root ]
# groupadd -g 50001 test
[ root@fllas01:/root ]
# grep test /etc/group
test:!:50001:
[ root@fllas01:/root ]
# groupdel test
[ root@fllas01:/root ]
# grep test /etc/group
[ root@fllas01:/root ]
#

Patrick Wallek
Honored Contributor

Re: Suse Linux - groupdel command gives error

Here are the appropriate software version from my server as well:

[ root@fllas01:/root ]
# groupadd ├в v
groupadd (pwdutils) 3.0.7.1
Copyright (C) 2005 Thorsten Kukuk.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[ root@fllas01:/root ]
# groupdel ├в v
groupdel (pwdutils) 3.0.7.1
Copyright (C) 2005 Thorsten Kukuk.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ root@fllas01:/root ]
# rpm ├в qa |grep pwdutils
pwdutils├в 3.0.7.1├в 17.24

If you are not up to date on pwdutils, you should probably look into getting there.
Patrick Wallek
Honored Contributor

Re: Suse Linux - groupdel command gives error

Darn windows cut-and-paste.

This should be better:

[ root@fllas01:/root ]
# groupadd -v
groupadd (pwdutils) 3.0.7.1
Copyright (C) 2005 Thorsten Kukuk.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
[ root@fllas01:/root ]
# groupdel -v
groupdel (pwdutils) 3.0.7.1
Copyright (C) 2005 Thorsten Kukuk.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ root@fllas01:/root ]
# rpm -qa |grep pwdutils
pwdutils-3.0.7.1-17.24