LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 11-02-2008, 04:48 PM   #1
rhermsen
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 41

Rep: Reputation: 16
passwd.new, shadow.new, group.new and gshadow.new after upgrade to slackware 12.1


Today I successfully upgraded from Slackware 12 to 12.1, but I have loads of questions regarding the following .new config files.
[edit 5-Apr-2010: compared a few items between 12.2 new install and a upgraded system 12 > 12.1 > 12.2]

/etc/passwd.new
/etc/shadow.new
/etc/group.new
/etc/gshadow.new

During the last upgrade from Slackware 11 to 12 I skipped them, but this time I want to know what I should change.


/etc/passwd.new
The new passwd file has the following differences:
1) For most (default) users the /bin/false is added as patch to the default shell.
Should I add this directory to the users with an UID below 100 (except root), and can I do that with vipw or can I better use usermod –s /bin/false <user> to change them one by one?
[edit 5-Apr-2010: for the UID's below 1000 I performed "usermod –s /bin/false <user>" for which this was the case with the new installed 12.2]
2) And the following users seems to be removed: dbus, avahi
Should I remove these two users? [userdel dbus (home dir is /) and userdel avahi (home dir is /)]


/etc/shadow.new
3) I discovered that my shadow file is missing an entry for user apache. This user is present in /etc/passwd.
How can I correct this?
4) The new shadow also shows the users dbus and avahi are removed.
Same as 2)
5) Further I see that for a number of users ! is changed to * (user:!: to user:*: )
I could not find the meaning in “man 5 shadow”
! means (cannot be accessed using a password?)
* means …?
Should I change this, and how (vi)?
6) Maximum password age is set to 99999 with password change warning of 7 days for newer users (e.g. dbus, avahi, haldaemon and the added users)
Should I set this for all users?


/etc/group.new
7) The new group file show a x for the password (group:x: ) i.s.o. notting (so specifies the use of /etc/gshadow as the passwd file).
Should I change the group file, and how (vi)? And should I also change the /etc/gshadow file?
8) For group bin the user ,daemon is removed from the secondary group member list (user daemon already has the group daemon as primary group in /etc/passwd)
Should I remove this in my active group file also? [usermod –G bin,adm daemon]
9) For group audio, video, cdrom and plugdev the user root is added
Should I change this in my active group file? [usermod –G audio,video,cdrom,plugdev,.... root]
10) Removed groups dbus, avahi
Should I remove these groups [groupdel dbus, groupdel avahi]
11) For haldaemon the GIU different (old GID = 71, new is GID = 82). GID 82 is not used. (Same is true for the UID in the /etc/passwd file, where the old UID is 71.)



/etc/gshadow
12) The new gshadow is completely empty.
What is the reason of this empty gshadow.new file? Do I need to take some action?
Is a missing entry in the gshadow file the same as no password in /etc/group (e.g. newgrp <group> cannot be used)?


I hope there is someone that answer at least some of them.

Last edited by rhermsen; 04-05-2010 at 10:51 AM.
 
Old 11-02-2008, 10:04 PM   #2
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 70
Personally, I did not see any reason to use the new passwd and group files. I just removed the new ones and kept my old ones. I have had no problems with this, and I have not heard of anyone mentioning otherwise. I go over this and many other upgrade related tasks in my Slackware 12.0-12.1 Upgrade HowTo (see my signature).

You might want to add your users to the lp group (see the HowTo).
 
Old 11-03-2008, 09:48 AM   #3
wadsworth
Member
 
Registered: Aug 2007
Distribution: Slackware64 13.37
Posts: 215

Rep: Reputation: 65
I've been toying with "Slamd64" a little recently
and saw a passage relating to this in their UPGRADE.TXT
Quote:
13. Be sure to move your *.new config files into place and merge any custom
changes you had made to the originals. To find them, run:
find /etc -name "*.new"
You will need to leave passwd, shadow, group, and gshadow alone for the
most part (do not copy the *.new versions over the existing ones), but
you will need to add any new user/group accounts in passwd.new and
group.new to the existing files...
Seems like this advice should apply to Slackware as well.
 
Old 11-05-2008, 04:18 PM   #4
rhermsen
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 41

Original Poster
Rep: Reputation: 16
Shadowsnipes, Wadsworth,

Thanks for your feedback.
Shadowsnipes,
I saw in your howto something about bootsplash, but this is not the bootsplash from www.bootsplash.org, but just a graphical screen during lilo correct?
I will try to get some time this weekend to read your HowTo.


Wadsworth,
In Slackware you have "slocate" which, if your database is up to date will very quickly provide a list of search results.
Updating the database can be performed with the command "updatedb".
So "slocate .new" will give a list of results, about the same as find /etc -name "*.new".



I hope someone can still answer a few of my questions.
I tried to login as apache, but that wasn't possible, so I'm not that concerned anymore.
 
Old 11-05-2008, 05:18 PM   #5
MS3FGX
Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 351Reputation: 351Reputation: 351Reputation: 351
You should use diff/sdiff to compare the new and old files to see if there are any differences beyond the users and groups you have added. It could be that new groups have been added and some users have been added to different groups.

For example, there were recently changes to the stock users and groups to accommodate the automatic mounting of devices through HAL. If you just deleted the .new file and didn't notice the new groups added, you would probably be scratching your head for some time trying to figure out what went wrong with the upgrade.

That being said, you definitely don't want to overwrite your files with the .new files in this case. Doing so would prevent you from being able to login when you started your machine back up; and in the case of a server with many users and groups you could be looking at a serious problem (of course you should have backups...but that is another topic entirely).

Last edited by MS3FGX; 11-05-2008 at 05:20 PM.
 
Old 11-05-2008, 10:37 PM   #6
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 70
Quote:
Originally Posted by rhermsen View Post
Shadowsnipes, Wadsworth,

Thanks for your feedback.
Shadowsnipes,
I saw in your howto something about bootsplash, but this is not the bootsplash from www.bootsplash.org, but just a graphical screen during lilo correct?
I will try to get some time this weekend to read your HowTo.
Correct. It is just the LILO boot screen splash. It is a simple yet stylish black and white Slackware logo.

MS3FGX,
I don't think there were any real changes in the passwd and group files between 12.0 and 12.1 (at least none that I saw). From 11.0 would likely be a different story though...

I agree that a diff should always be done just to be sure, but something significant like that would most likely be in the CHANGES_AND_HINTS.TXT as well.
 
Old 11-08-2008, 05:59 PM   #7
rhermsen
Member
 
Registered: Jan 2006
Distribution: Slackware
Posts: 41

Original Poster
Rep: Reputation: 16
MS3FGX,

Thanks for pointing out sdiff. I indeed used diff to find the differences of the .new files as you can see in my first post.
with sdiff on the old and new /etc/passwd if discovered there where two other users in the .new file "nobody" and “pop”.
So another question (13), should I add these?

shadowsnipes,
As mentioned in my start post I also didn't tough these 4 files after upgrading from 11.0 to 12.0 (but also then the C&H file didn't mention anything else than now if I'm not mistaken).

I did read your HowTo and it was indeed helpful.
Especially the info about slackpkg.
I always make my packages with my initials in the build, but the output of non-slack packages reminded my of some cleanup I needed to perform on old splashy packages.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
/etc/passwd, /etc/shadow, /etc/group? Educate me :)! nutnut Linux - General 4 06-11-2005 08:47 PM
Create new shadow and gshadow files-HOW? MichaelP Linux - Newbie 1 03-16-2005 02:07 PM
It is ok if i unshadow the /etc/passwd and /etc/shadow Paxmaster Linux - Software 1 01-12-2005 11:07 PM
Trouble after copy shadow, group and passwd to ltsp server tapanga Linux - General 1 04-19-2004 01:59 PM
/etc/passwd or /etc/shadow? tiger7007 Linux - Security 2 03-21-2004 05:41 AM


All times are GMT -5. The time now is 05:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration