View previous topic :: View next topic |
Author |
Message |
mikefot l33t
Joined: 19 Nov 2014 Posts: 709
|
Posted: Fri May 01, 2020 10:06 am Post subject: generating an nsswitch.conf file where none exists[SOLVED] |
|
|
Dear All,
I am running gentoo amd64 stable on an old hp laptop.
I am having difficulty connecting to some gentoo mirrors to fetch packages.
I think the dns function is impaired at present.
I noticed that I do not have an nsswitch.conf file.
Suggestions on running a command will generate one would be appreciated.
Regards
Michael Fothergill
Last edited by mikefot on Sun May 03, 2020 6:43 am; edited 1 time in total |
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Fri May 01, 2020 10:48 am Post subject: |
|
|
/etc/nsswitch.conf belongs to sys-libs/glibc on my system. So I guess you can re-emerge that package in order to re-generate the file.
In alternative, here you are my (unmodified) nsswitch.conf file from my system:
Code: | # /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
#
passwd: db files
group: db files
initgroups: db [SUCCESS=continue] files
shadow: db files
gshadow: files
hosts: files dns
networks: files dns
protocols: db files
services: db files
ethers: db files
rpc: db files
netgroup: db files |
|
|
Back to top |
|
|
mikefot l33t
Joined: 19 Nov 2014 Posts: 709
|
Posted: Fri May 01, 2020 11:12 am Post subject: |
|
|
Many thanks for your response.
I created an nsswitch file using your template.
I then tried to emerge glibc.
The build.log file is here:
https://paste.debian.net/1144123/
The output of
Code: | emerge --info '=sys-libs/glibc-2.29-r8::gentoo' |
is here
https://paste.debian.net/1144124/
Comments appreciated
Regards
MF |
|
Back to top |
|
|
mike155 Advocate
Joined: 17 Sep 2010 Posts: 4438 Location: Frankfurt, Germany
|
Posted: Fri May 01, 2020 6:14 pm Post subject: |
|
|
User 'portage' was deleted from '/etc/passwd' and '/etc/group'????
How could that happen?
The output you posted tells you how you can restore that user:
Code: | portage: 'portage' user or group missing.
For the defaults, line 1 goes into passwd, and 2 into group.
portage:x:250:250:portage:/var/tmp/portage:/bin/false
portage::250:portage |
But I'm afraid that much more has been destroyed on your machine... Please tell us what you have done! |
|
Back to top |
|
|
mikefot l33t
Joined: 19 Nov 2014 Posts: 709
|
Posted: Sat May 02, 2020 3:19 pm Post subject: |
|
|
Many thanks for your response.
I fixed my system by moving to the directory and installing the again on top of the existing install.
It created me a and binary that got me going again.
I managed to save the install and get rid of the portage errors and other dependency problems.
I have made the deep world update run correctly along with perl-cleaner --all....
I also reinstalled .
What is odd is that when I try to log in either as user or root after I input the password
nothing happens....
I just get the login prompt appearing again and an error message saying .
What could cause that to occur?
Cheers
MF
PS
I think I have figured out what the problem could be.
I deleted the entry in my by mistake.
I need to have in there.
I have added it in and am now doing a world update.
Cheers
MF
Last edited by mikefot on Sat May 02, 2020 4:12 pm; edited 2 times in total |
|
Back to top |
|
|
fturco Veteran
Joined: 08 Dec 2010 Posts: 1181 Location: Italy
|
Posted: Sat May 02, 2020 4:08 pm Post subject: |
|
|
Is your unprivileged user listed in /etc/passwd?
You may also try resetting passwords with the passwd command after chroot'ing with a live CD. |
|
Back to top |
|
|
mikefot l33t
Joined: 19 Nov 2014 Posts: 709
|
Posted: Sat May 02, 2020 4:10 pm Post subject: |
|
|
Many thanks for your response and suggestion.
I can make a livecd quite easily for gentoo.
I will try this out after fixing the USE flag omission.
Cheers
MF
PS
Since the original problem of the nsswitch.conf file is now fixed I am going to declare the problem solved and
move the discussion about the login problem to the Desktop Environments section of the forum.
I have got my user account and password working and can login to and which I have now installed.
I cannot login to root properly yet.
I will create a new post on the desktop section about this.
Many thanks for the all the help. |
|
Back to top |
|
|
|