# Can't run su command after to install FreeBSD 11.0



## btomza (Dec 21, 2016)

Hi everyone,

Just I'm installing FreeBSD 11 (in a new machine), and after to install it I can't run "su" command, in the installation process I've added the new user to the wheel group, but anyway I can not run that command.

(Well, I can run SU command but I can not access as root.)

I didn't have that problem when I installed FreeBSD 10.1 .

I'm installing it from a USB.

Do you have any idea?
Thanks


----------



## chrbr (Dec 21, 2016)

You can run chkgrp(8) to verify if /etc/group is ok.


----------



## btomza (Dec 21, 2016)

chrbr said:


> You can run chkgrp(8) to verify if /etc/group is ok.



Yes, "/etc/group is fine".

also the command "pw groupshow wheel" said "wheel:*:0:root,myuser"; so I think all is OK ....


----------



## chrbr (Dec 21, 2016)

btomza said:


> "pw groupshow wheel" said "wheel:*:0:root,myuser"; so I think all is OK ....


Here it is similar. The only idea I have is to re-generate the password database by pwd_mkdb(8). Just in case. How about the output of `id` as user?


----------



## Maxnix (Dec 21, 2016)

Pheraps it's a stupid question, but are you sure that the root account is not locked?


----------



## chrbr (Dec 21, 2016)

Maxnix said:


> Pheraps it's a stupid question, but are you sure that the root account is not locked?


This is a good question.


----------



## btomza (Dec 21, 2016)

Maxnix said:


> Pheraps it's a stupid question, but are you sure that the root account is not locked?


mmm, good question....

I think the root it isn't locked .... how can it verify it? it's enough if I see the passwd file and try to find *LOCKED* keyword?


----------



## btomza (Dec 21, 2016)

One more thing... I've installed it with ZFS, could it be a problem? (I've used it before and I've never had a problem)


----------



## chrbr (Dec 21, 2016)

From my understanding it means that you can not login as root on a console, as if you have forgotten your root password. Only the path via security/sudo may work if installed and configured correctly.


----------



## chrbr (Dec 21, 2016)

btomza said:


> One more thing... I've installed it with ZFS, could it be a problem? (I've used it before and I've never had a problem)


I do not think that ZFS causes such a problem. I have only one box with ZFS and no issues. Others use UFS. But everything is still on FreeBSD 10.3.


----------



## btomza (Dec 21, 2016)

chrbr said:


> From my understanding it means that you can not login as root on a console, as if you have forgotten your root password. Only the path via security/sudo may work if installed and configured correctly.


Yes, I can not login as root, but I have not forgotten the password.... also I've reinstalled it many times (with simple passwords as 123456), but I can't login as root.


----------



## chrbr (Dec 21, 2016)

btomza said:


> Yes, I can not login as root, but I have not forgotten the password.... also I've reinstalled it many times (with simple passwords as 123456), but I can't login as root.


The please boot in the single user mode. This mode has no password. In this mode it should be possible to change the root password by vipw(8). I think it is necessary to re-mount the root file system to read-write for doing that. If this does not work it should be possible to delete the asterik * in the password file to remove the password. Both ideas if I remember correctly. This is nothing what I did that often.


----------



## chrbr (Dec 21, 2016)

I have just tried that. `mount -a` in single user mode mounts the contents of /etc/fstab that vipw(8) works. But I have not tried to change my root password .


----------



## btomza (Dec 21, 2016)

FORGET, this post!!, It was MY FAULT!!
I don't know what was the problem, I've downloaded the image again and I've created the USB again and now it works.

Thanks a lot for your comments!!


----------



## chrbr (Dec 21, 2016)

btomza said:


> I don't know what was the problem, I've downloaded the image again and I've created the USB again and now it works.


Sometimes there can be problems with the download ore USB devices. Regarding the download it is possible to verify the checksums. Regarding the USB stuff there are no options. I guess it is not really your personal fault. And it is good to know that it works now.


----------



## Maxnix (Dec 22, 2016)

btomza said:


> mmm, good question....
> 
> I think the root it isn't locked .... how can it verify it? it's enough if I see the passwd file and try to find *LOCKED* keyword?


Yep. 


btomza said:


> FORGET, this post!!, It was MY FAULT!!
> I don't know what was the problem, I've downloaded the image again and I've created the USB again and now it works.
> 
> Thanks a lot for your comments!!


Probably a corrupted image. Nothing unsolvable.


----------

