[SOLVED] How to manually cleanup/delete temp user's made for tests, In chroot envir CH.8 LFS 11.0 stable (sysVinit)
by turbocat from LinuxQuestions.org on (#5S6D3)
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."
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."