LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.

Notices


Reply
  Search this Thread
Old 11-21-2021, 06:48 PM   #1
turbocat
LQ Newbie
 
Registered: Nov 2021
Distribution: MX Linux
Posts: 5

Rep: Reputation: Disabled
How to manually cleanup/delete temp user's made for tests, In chroot envir CH.8 LFS 11.0 stable (sysVinit)


This is my first post! Novice Linux user. I'm doing Linux From Scratch 11.0 stable (sysVinit) and am at the very end of Chapter 8 Installing Basic System Software, which is done in the chroot enviroment. Page[8.78. Cleaning Up]. Debian host (MX Linux) on another Partition(not a vm).

My Question: How do I manually remove the temporary 'tester' user account, (created at the beginning of CH7(there is two duplicate)), and what All needs to be removed or preserved? Decided to take my time before doing anything as not to break anything.

I ran this command per the book to 'remove temporary tester account' and received this output:

Command ran:

userdel -r tester

Output:

Multiple entries named 'tester' in /etc/passwd. Please fix this with pwck or grpck.
userdel: cannot remove entry 'tester' from /etc/passwd

And from 'grep tester /etc/passwd' is see there is two of these users with execute permissions:

tester:x:101:101::/home/tester:/bin/bash
tester:x:101:101::/home/tester:/bin/bash

-The only thing I have found looking one more time before posting this is someone had a problem not being able to create the tester temp user in LFS 10, they said it was because they had mounted /dev or /dev/pts when it was already mounted, that's not the same issue I'm having but it's definitely possible I mounted it after it was mounted because I tend to triple check variables are set or things are mounted and didn't know this would cause an issue. This is likely why there is two 'tester' temporary users? (Maybe if I exit un-mount, reboot, re-enter ,remount and try 'userdel' again?)Or use pwck , grpck like the message says? If so how would I use them? Here is the output of mount while in chroot envir:

(lfs chroot) root:/# mount
/dev/sda4 on / type ext4 (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3996404k,nr_inodes=999101,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
tmpfs on /run type tmpfs (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3996404k,nr_inodes=999101,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3996404k,nr_inodes=999101,mode=755)
udev on /dev/pts type devtmpfs (rw,nosuid,relatime,size=3996404k,nr_inodes=999101,mode=755)
tmpfs on /run type tmpfs (rw,relatime)





"Please let me know if there's anything I can do to improve my post, and if there's anything I should do differently when posting. Thank you, for your time and help."
 
Old 11-21-2021, 07:27 PM   #2
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 67

Rep: Reputation: Disabled
from the chroot env i would vi into /etc/passwd and delete one of the tester lines then try userdel again

if you exit the chroot but do not reboot, it is important to umount the virtual fs (dev/pts, dev, proc, run, sys), or when you re-enter chroot and remount them it can cause problems
 
1 members found this post helpful.
Old 11-21-2021, 07:36 PM   #3
turbocat
LQ Newbie
 
Registered: Nov 2021
Distribution: MX Linux
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you wiigelec. Okay I will try that and try the userdel again. Very good to know about unmounting, I appreciate it.
 
Old 11-21-2021, 07:47 PM   #4
turbocat
LQ Newbie
 
Registered: Nov 2021
Distribution: MX Linux
Posts: 5

Original Poster
Rep: Reputation: Disabled
Okay I edited the /etc/passwd file and removed one of the tester user lines, it gave me the same message again. Is having that tester user going to cause problems later if I don't resolve it now?
 
Old 11-21-2021, 07:50 PM   #5
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 67

Rep: Reputation: Disabled
did you try running pwck?
 
1 members found this post helpful.
Old 11-21-2021, 08:15 PM   #6
turbocat
LQ Newbie
 
Registered: Nov 2021
Distribution: MX Linux
Posts: 5

Original Poster
Rep: Reputation: Disabled
Edit: Yes It output this message, I selected no cause I didn't know what that entry is:

user 'messagebus': directory '/run/dbus' does not exist
invalid password file entry
delete line ''? no

I also tried 'grpck -r'read only and it looked at tester:

duplicate group entry
delete line 'tester:x:101:'? No

Last edited by turbocat; 11-21-2021 at 08:22 PM.
 
Old 11-21-2021, 08:27 PM   #7
wiigelec
Member
 
Registered: Nov 2021
Distribution: Devuan
Posts: 67

Rep: Reputation: Disabled
it would seem that 'yes' would be the appropriate response for the tester entry

Last edited by wiigelec; 11-21-2021 at 08:30 PM. Reason: spelling
 
1 members found this post helpful.
Old 11-21-2021, 08:44 PM   #8
turbocat
LQ Newbie
 
Registered: Nov 2021
Distribution: MX Linux
Posts: 5

Original Poster
Rep: Reputation: Disabled
It worked, this is great. Thank you so much I appreciate you taking the time to help.


ran 'grpck' with no options after running it as read only 'grpck -r' , selected yes when prompted and tester is removed.

Last edited by turbocat; 11-21-2021 at 08:46 PM.
 
  


Reply



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
My lfs/blfs 8.2 (sysvinit edition) can't connect to my modem/router combo wifi. (works in chroot through host system but not in os) Jury76 Linux From Scratch 2 07-31-2018 10:08 PM
[SOLVED] systemd startup and init, rc.d interactions vs sysvinit (migrated from sysvinit to system) spenced Linux From Scratch 3 07-20-2018 01:47 PM
[SOLVED] LFS 8.2 stable Sysvinit Start /Stop network services ? rabidlinux Linux From Scratch 5 05-20-2018 07:17 AM
The Apache Tomcat Native library which allows optimal performance in production envir jimmyjiang Red Hat 2 07-30-2007 03:42 PM
Redhat 7.2 will not gon to graphical envir... kevinm2 Linux - Software 6 06-08-2005 01:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

All times are GMT -5. The time now is 12:10 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
Open Source Consulting | Domain Registration