Freebsd 12.0 Google Cloud

andregrjp

New Member


Messages: 5

Hello,

I installed Freebsd 12.0 in Google Cloud but I can't create a new user.
I tried with adduser and pw. In both cases there isn't a response from the OS, however, I can create groups,

Also, I have seen that "home" directory doesn't exist after the initial installation, I created the folder but didn't fix the issue.

I am wondering if someone faced the same problem with the Google Cloud instance.

Thanks
Andregrjp
 
OP
OP
A

andregrjp

New Member


Messages: 5

Lamia, what do you mean?
I have freebsd in AWS and in my local machine and is working with users as well as groups. Looks like freebsd in Google is different.
Can you please provide more info?
 

obsigna

Aspiring Daemon

Reaction score: 575
Messages: 967

Just recently, I also set up FreeBSD 12.0-RELEASE on a GCP instance. I got a few AWS instances running as well. In both cases, after a fresh install and launch, my first goal is to gain root access. Once I have this, everything else behaves just normal.

That said, the troubleshooting starts with step 0, like with an electric device, i.e. „0. Verify that you got the power plug set into the mains socket."

Troubleshooting:
0. Verify that you got root access rights.

1. Use the catholic pw(8) command sequence for creating a user:
# pw useradd -n andre -c "André" -m -s /bin/csh
# passwd andre
2. Repair the passwd database:
pwd_mkdb -p /etc/master.passwd
then repeat ts-step 1​

If ts-step 1 was successful, ts-step 2 is not necessary.
 
OP
OP
A

andregrjp

New Member


Messages: 5

Thanks obsigna, I will try it today.
With AWS I had the same issue but I could create a user with the useradd command. After that everything was ok.
However with the Google version, everytime I typed the pw command to create a user, I didn't get any response (system hang out) and I pressed ctrl+z to cancel it. The strange was that I could add groups.

Also I want to mention that /usr/home/ directory doesn't exist and I created it manually (not sure if this was intentional). Did you have the same issue with the home directory?
 

Trihexagonal

Daemon

Reaction score: 900
Messages: 1,560

It doesn't work on my FreeBSD 11.2-RELEASE-p14 box either:

Code:
root@unmei:/ # which useradd
useradd: Command not found
$ which adduser does though. :p

Code:
$ which adduser
/usr/sbin/adduser
 
OP
OP
A

andregrjp

New Member


Messages: 5

I tried again but after executing the command for adduser, nothing happens


# freebsd-version
12.0-RELEASE-p10

# uname -mrs
FreeBSD 12.0-RELEASE-p10 amd64

# which adduser
/usr/sbin/adduser

# echo $SHELL
/bin/sh

# pw adduser -n andre -c "Andre" -m -s /bin/csh
<just hang, nothing happen>
 
OP
OP
A

andregrjp

New Member


Messages: 5

I found the issue. I was using OS login in global metadata and didn't allow the google account daemon to start.

I tried to start it manually and I was getting this error:

# /usr/local/etc/rc.d/google_accounts_daemon restart
Stopping google_accounts_daemon.
Starting google_accounts_daemon.
# Deactivating Google Compute Engine OS Login.
echo: write error on stdout
echo: write error on stdout
echo: write error on stdout
echo: write error on stdout
echo: write error on stdout
Then from the global metadata I removed the key for OS login and I restarted the instance. After that I could start the daemon and create users
 
Top