Freebsd 12.0 Google Cloud

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
 
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?
 
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.
 
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?
 
... With AWS I had the same issue but I could create a user with the useradd command.

None of my systems knows the useradd command, neither of FreeBSD 12.0-RELEASE on AWS and GCP, nor any FreeBSD on my local systems.
which useradd
useradd: Command not found.

... 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?

I don’t remember, however, I can tell that this is not an issue at all, because the -m flag of the pw(8) command would create the necessary directory tree for the user’s home directory if it doesn't exist yet. It even would create the symlink in the root fs, i.e. /home -> usr/home.
 
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
 
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>
 
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
 
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

How do you mean global metadata? What exactly did you remove? I tried to run "/usr/local/bin/google_oslogin_control deactivate", but that didn't help in re-enabling the ability to create accounts.
 
zilti Keep in mind you're responding to an old thread and andregrjp hasn't been seen since he posted it. Don't expect a reply any time soon.
 
Back
Top