WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Possible problem with groupadd command  (Read 3650 times)

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Possible problem with groupadd command
« on: January 29, 2013, 08:30:06 PM »
Hi all,

I've spotted a strange message in /var/log/messages when creating a group with the groupadd command from shadow-utils.tcz

Here's the steps.

I'm using microcore 3.8.4

Boot code used: mc syslog

Installed shadow-utils.tcz
Code: [Select]
tce-load -wi shadow-utils.tcz
Use the groupadd command.
Code: [Select]
sudo groupadd erstat
Output from /var/log/messages
Code: [Select]
tc@box:~$ tail -f /var/log/messages
Jan 30 11:17:29 (none) local2.notice sudo:       tc : TTY=pts/1 ; PWD=/home/tc ; USER=root ; COMMAND=/usr/local/sbin/groupadd erstat
Jan 30 11:17:29 (none) auth.crit groupadd[934]: cannot open login definitions /etc/login.defs [No such file or directory]
Jan 30 11:17:29 (none) auth.crit groupadd[934]: cannot open login definitions /etc/login.defs [No such file or directory]
Jan 30 11:17:29 (none) auth.info groupadd[934]: new group: name=erstat, gid=500

The group does get created, and it does work for samba.

I tried creating a few other groups just in case I was dealing with a reserved word or something like that, but its  a consistent message in the logs.
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Possible problem with groupadd command
« Reply #1 on: January 29, 2013, 08:37:05 PM »
Hi remus
Quote
.... notice sudo: .....
This message shows up anytime you use sudo.
Quote
cannot open login definitions /etc/login.defs [No such file or directory]
shadow-utlis contains:
Code: [Select]
usr/local/etc/login.defs

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Possible problem with groupadd command
« Reply #2 on: January 29, 2013, 09:09:12 PM »
Thanks Rich,

Is this error going to cause any problems ?

I'm going to switch to the addgroup and adduser commands that come with mc/tc for now.

And uninstall shadow-utils.tcz with
Code: [Select]
tce-audit builddb
tce-audit delete shadow-utils

And reboot
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Possible problem with groupadd command
« Reply #3 on: January 29, 2013, 09:31:31 PM »
Hi remus
I don't think it will cause any problems. You'll need to backup:
Code: [Select]
/etc/passwd
/etc/group

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Possible problem with groupadd command
« Reply #4 on: January 29, 2013, 09:47:34 PM »
Thanks Rich,

Yep, got
etc/passwd
etc/shadow
etc/group
added to my /opt/.filetool.lst file

Ok, so i've had a look at the relevent files and everything, works fine in samba.

Is it possible that when shadow-utils could be compiled with updated login.defs location ?
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Possible problem with groupadd command
« Reply #5 on: January 29, 2013, 10:06:34 PM »
Hi remus
Something similar came up recently with another extension, don't remember which one. One propose solution
was to create a link between  /etc/FILENAME  and  /usr/local/etc/FILENAME

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Possible problem with groupadd command
« Reply #6 on: January 30, 2013, 12:54:46 AM »
should I post a report about this being a bug in the relevant forum ?
Live long and prosper.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11634
Re: Possible problem with groupadd command
« Reply #7 on: January 31, 2013, 11:46:25 AM »
Hi remus
You could, but be aware that  jpeters  has not been active since 2011. Also note, bmarkus has already filed an
unrelated bug report against shadow-utils.tcz.
http://forum.tinycorelinux.net/index.php/topic,13099.msg72203.html#msg72203

Offline remus

  • Sr. Member
  • ****
  • Posts: 371
Re: Possible problem with groupadd command
« Reply #8 on: January 31, 2013, 08:00:58 PM »
Source for shadow-utils can be found here:

http://pkg-shadow.alioth.debian.org/

If no one jumps at the chance to tcz this I might have a crack.
Live long and prosper.