Cannot login as user

Hi,
I recently did a fresh installation of FreeBSD.

After installing some packages and copying over some old config files I wanted to add a normal user:

Home is /home/user
Permissions are 0750
User was added to video group.

But I can not log in as user:


Code:
Cannot find root directory.

Login: Could not determine audit condition.


The home directory was created, but the .Xauthority file is missing.
Somewhere I got the message ".serverauth##" not found.
 
What happens when you log in from a text console? If that succeeds, what happens if you first do that, and then use startx to fire up the GUI? What happens if you log in as root, and su to the user account? Have you checked the ownership of the user's home directory, and its content?
 
Yes, this is what happens if I log in via console. The ownership is user:user

sudo -i -u user
returns
Code:
unable to execute /usr/local/bin/zsh: Permission denied
 
After installing some packages and copying over some old config files
What kind of config files?

sudo -i -u user
returns
Code:
unable to execute /usr/local/bin/zsh: Permission denied
This sounds like a sudo.conf user permission issue.

Try su - <user_name>

If still no login, try chsh(1) user with a base system login shell
Code:
/bin/sh
/bin/csh
/bin/tcsh

If that doesn't help either, create a new user with a base system login shell, try login, if successful, set the users login shell to zsh.
 
su - user
Code:
su: no directory

users
Code:
root

getent passwd user
Code:
user::1002:1002:User &:/home/user:/usr/local/bin/zsh

User is shown in:
/etc/passwd and /etc/group
 
ls -ld /home /home/user
Code:
drwxr-xr-x 3 root wheel 512B Apr 13 11:47 /home
drwxr-x--- 5 user user 512B Apr 13 12:01 /home/user
This is what my side looks like:

Code:
% ls -ld /home/ /home/yusuf/
drwxr-xr-x   3 root  wheel  3 Jan 30 19:02 /home/
drwxr-xr-x  31 yusuf yusuf 60 Apr 14 15:05 /home/yusuf/

Maybe you have permission issues?
 
750 should be fine for home directories. But I was thinking maybe home -> usr/home symlink was missing, or the permissions on /home itself may have been too restrictive. That looks fine, so not the cause of the weird login errors.

Perhaps it's something in one of the shell startup scripts? Cannot find root directory. might be because $ZDOTDIR is pointing to some directory the user cannot access?
 
But I was thinking maybe home -> usr/home symlink was missing
I don't have these symlinks but I can login successfully, why so?

Thanks for info.

Code:
% zfs list -r zroot
NAME                              USED  AVAIL  REFER  MOUNTPOINT
zroot                            84.5G   115G    96K  none
zroot/ROOT                       8.10G   115G    96K  none
zroot/ROOT/default               8.10G   115G  7.78G  /
zroot/home                       17.5G   115G    96K  /home
zroot/home/yusuf                 17.5G   115G  16.9G  /home/yusuf
zroot/poudriere                  16.5G   115G   132K  /poudriere
zroot/poudriere/data             12.6G   115G  10.7G  /poudriere/data
zroot/poudriere/jails            3.88G   115G    96K  /poudriere/jails
zroot/poudriere/jails/134i386    1.27G   115G  1.27G  /poudriere/jails/134i386
zroot/poudriere/jails/142amd64   1.37G   115G  1.37G  /poudriere/jails/142amd64
zroot/poudriere/jails/142i386    1.24G   115G  1.24G  /poudriere/jails/142i386
zroot/tmp                        14.3M   115G   412K  /tmp
zroot/usr                        6.70G   115G    96K  /usr
zroot/usr/local                   984K   115G    96K  none
zroot/usr/local/etc               888K   115G    96K  none
zroot/usr/local/etc/poudriere.d   792K   115G   792K  /usr/local/etc/poudriere.d
zroot/usr/ports                  4.18G   115G  3.63G  /usr/ports
zroot/usr/ports/distfiles         509M   115G   509M  /usr/ports/distfiles
zroot/usr/ports/packages          132K   115G   132K  /usr/ports/packages
zroot/usr/src                    2.52G   115G  2.52G  /usr/src
zroot/var                        35.6G   115G    96K  /var
zroot/var/audit                    96K   115G    96K  /var/audit
zroot/var/ccache                 34.3G   115G  34.1G  /var/ccache
zroot/var/crash                  1.36G   115G  1.36G  /var/crash
zroot/var/log                    3.78M   115G  1.22M  /var/log
zroot/var/mail                    256K   115G   152K  /var/mail
zroot/var/tmp                     128K   115G   128K  /var/tmp
 
So, I don't use zsh(1) but installed it on a test server, created a new user with zsh(1) as its shell. When I login I am presented with something from zsh(1):
Code:
This is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~).  This function can help you with a few settings that should
make your use of the shell easier.

You can:

(q)  Quit and do nothing.  The function will be run again next time.

(0)  Exit, creating the file ~/.zshrc containing just a comment.
     That will prevent this function being run again.

(1)  Continue to the main menu.

--- Type one of the keys in parentheses ---

Aborting.
The function will be run again next time.  To prevent this, execute:
  touch ~/.zshrc

As this is an entirely new install, my guess would be this start script has issues. Not sure where it comes from though, man page mentions various files in /etc/ (which don't exist) but they don't exist in /usr/local/etc/ either.

Code:
       $ZDOTDIR/.zshenv
       $ZDOTDIR/.zprofile
       $ZDOTDIR/.zshrc
       $ZDOTDIR/.zlogin
       $ZDOTDIR/.zlogout
       ${TMPPREFIX}*   (default	is /tmp/zsh*)
       /etc/zshenv
       /etc/zprofile
       /etc/zshrc
       /etc/zlogin
       /etc/zlogout    (installation-specific -	/etc is	the default)

OpenStyle did you perhaps copy one (or all) of those files from a Linux server?
 
Back
Top