Find the answer to your Linux question:
Results 1 to 6 of 6
If a user xxxx login and the xxxx home directory is missing, the system display the message: <<No directory found /home/xxxx. Logging in with home="/".>> What to do if I ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Aug 2004
    Location
    Milan (italy)
    Posts
    2

    How to change dir if missing the user home directory


    If a user xxxx login and the xxxx home directory is missing, the system display the message:
    <<No directory found /home/xxxx. Logging in with home="/".>>
    What to do if I wish to chroot the user to a directory different from "/" ?
    I tried the keyword "DEFAULT_HOME no" in the /etc/login.defs, but it doesn't work. My distro (RedHat 9.C) uses PAM (/etc/pam.d). Is there a way to instruct PAM to use a default_home directory other than "/" ?.
    Thanks

  2. #2
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    it looks like you need to create a home directory for xxxx, make one, and you should be fine
    Code:
    mkdir /home/xxxx
    logout and login, see what happens, post any errors hear.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  3. #3
    Linux Newbie
    Join Date
    May 2004
    Location
    Boston, MA
    Posts
    246
    Also, if you want to set your user's home directory to something other than /home/xxxx, you can edit the /etc/passwd file as root and change it there. You'll find a line that looks like this:
    Code:
    xxxx&#58;x&#58;1000&#58;1000&#58;&#58;/home/xxxx/&#58;/bin/bash
    which you can change to, for instance,
    Code:
    xxxx&#58;x&#58;1000&#58;1000&#58;&#58;/etc/pr0n/&#58;/bin/bash
    to change the user xxxx's home directory to /etc/pr0n/.
    Situations arise because of the weather,
    And no kinds of love are better than others.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    hahaha
    dan@needstogetsome
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

  6. #5
    Just Joined!
    Join Date
    Aug 2004
    Location
    Milan (italy)
    Posts
    2
    I'sorry, I wasn't accurate in my question. The problem is that I want to manage the event when the home directory is missing, for instance when one uses smb and winbind to authenticate via NT domain controller. The user does't have a record in the passwd file and so no home directory. You can create the home directory for some users but not for all (the NT or AD domain users may be hundreds). So the problem is to manage some incoming domain users to a particular default home dir (with restricted or no access, say /home/dummy) or to invalidate the login process and deny the login. I didn't found anything describing how to manage this event (I tried with PAM manuals and other). Someone has other ideas?
    Thanks in advance

  7. #6
    Linux Guru kkubasik's Avatar
    Join Date
    Mar 2004
    Location
    Lat: 39:03:51N Lon: 77:14:37W
    Posts
    2,396
    I think you might want to just create smb groups, and link them to a folder. (sorry i don't have the specifics on how to do this). it sounds like you want most people who log on to just be directed to one shared folder. There is a far easier way to do that im smb. You can just share a folder and make the folder's authentication mode 'user'. this allows anyone with an account to access it.
    Avoid the Gates of Hell. Use Linux
    A Penny for your Thoughts

    Formerly Known as qub333

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •