Sunday, February 15, 2015

How to enable su - to root on freebsd

How to enable su - on freebad.

If you get error like below, you have to perform the following task below.

su: Sorry for normal user account

By default su - to root is disabled. Only users on wheel group are allow to su to root.

You can change this behivour by
a. adding use to the wheel group and
b. changing the pam_group config at /etc/pam.d/su

A. Add user to the wheel group.
# pw user mod <username> -G wheel
# pw user mod jay -G wheel
# groups jay
jay wheel

B. modify /etc/pam.d/su file to enable for all users by commenting out the line below.
# vi /etc/pam.d/su

# auth requisite no_warn group=wheel root_only fail_safe ruser
wq !

Now, open a new ssh session and try again. you should be able to login to root with su - 

No comments:

Post a Comment