Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't add user and install packages
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
hieuhuynh
n00b
n00b


Joined: 16 Aug 2017
Posts: 5

PostPosted: Wed Aug 16, 2017 10:47 pm    Post subject: Can't add user and install packages Reply with quote

I have just installed Gentoo inside Qemu, then log in as normal
but when I add new user, I get "cannot lock /etc/passwd".
Then I even can't install new packages.
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Wed Aug 16, 2017 11:23 pm    Post subject: Reply with quote

Welcome to Gentoo!

Two possibilities. First, your drive is full. Second you must run useradd as root and your not. More information is needed.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Thu Aug 17, 2017 1:23 am    Post subject: Reply with quote

Please post the full output of the command, starting with the shell prompt at which you entered the command and ending with the next shell prompt.
Back to top
View user's profile Send private message
hieuhuynh
n00b
n00b


Joined: 16 Aug 2017
Posts: 5

PostPosted: Thu Aug 17, 2017 2:12 am    Post subject: Reply with quote

I chroot into Gentoo from CD, I can add new user and install packages.

When I boot Gentoo as normal
I try to install Netifrc.
It report that: "/var/db/pkg" and "/var/log/emerge.log" is read-only
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Thu Aug 17, 2017 2:46 am    Post subject: Reply with quote

post your /etc/fstab
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
hieuhuynh
n00b
n00b


Joined: 16 Aug 2017
Posts: 5

PostPosted: Thu Aug 17, 2017 3:25 am    Post subject: Reply with quote

Here

Code:
/dev/sda2           /boot                vfat                defaults,noatime          0 2
/dev/sda3           none                sw                 defaults                        0 0
/dev/sda4           /                       ext4               defaults,noatimie          0 1


It maybe the source of problem.

Mod edit: fixed code tags
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Thu Aug 17, 2017 3:29 am    Post subject: Reply with quote

You have a typo in your root line. It should be noatime but you have noatimie with an extra i.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
hieuhuynh
n00b
n00b


Joined: 16 Aug 2017
Posts: 5

PostPosted: Thu Aug 17, 2017 4:05 am    Post subject: Reply with quote

I fixed it.
The error is the same.
I think I have some missings when extract file "stage3*.tar.gz" for installing Gentoo
The output when run "ls -l /etc/passwd" is:
Code:

-rw-r--r-- root root 858 Aug 17 01:47 /etc/passwd
Back to top
View user's profile Send private message
The Doctor
Moderator
Moderator


Joined: 27 Jul 2010
Posts: 2574

PostPosted: Thu Aug 17, 2017 4:10 am    Post subject: Reply with quote

You have to reboot for it to take effect.

The output for ls -l /etc/passwd is correct. Only root should have access to that file and no one else should be allowed to edit or view it.
_________________
First things first, but not necessarily in that order.

Apologies if I take a while to respond. I'm currently working on the dematerialization circuit for my blue box.
Back to top
View user's profile Send private message
hieuhuynh
n00b
n00b


Joined: 16 Aug 2017
Posts: 5

PostPosted: Thu Aug 17, 2017 4:24 am    Post subject: Reply with quote

Thank you ! .
I just delete a line in /etc/fstab that I believe it is a comment. It's already there before.
Now running.
I love Linux.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 13831

PostPosted: Fri Aug 18, 2017 1:21 am    Post subject: Reply with quote

The Doctor wrote:
The output for ls -l /etc/passwd is correct. Only root should have access to that file and no one else should be allowed to edit or view it.
I concur that his permissions are correct, but your description sounds more applicable to shadow than to passwd. For the benefit of new readers who happen across this post: for historical reasons, passwd is writable only to root, is world-readable, and does not contain passwords. Shadow is restricted to root only and contains authentication sensitive material.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum