Windows profiles folder


#1

By default user’s home folder is created /home/ how can I change that? What I want to achive is that when user logs into windows, the personal folder that he see’s is not /home/


#2

Hey,

what exactly do you want to achieve? It’s kind of hard to give advice when you only state what you don’t want.

Kind regards,
mosu


#3

Well, I want the users home folder to be /some/othter/folder/%U/ not /home/%U


#4

Hey,

that’s actually still not entirely clear, I’m sorry.

On Linux each user account has a home directory associated with it. This is usually »/home/username«, e.g. »/home/janesmith« for a user called »janesmith«. You can change this folder in the UDM (Univention Directory Manager) by opening a user, selecting »Account« on the left and changing the »Unix home directory« unter the »POSIX (Linux/UNIX)« heading.

This Linux/UNIX home directory is also the folder that a user sees when she opens the user’s folder on the server in the Windows network neighborhood, e.g. »\servername\janesmith« for a user »janesmith«.

Now in a pure Windows installation joined into the domain that folder has no special meaning as Windows doesn’t auto-connect to it by default. You can, however, use various methods to map such a folder: logon scripts, group policies or the UDM’s settings »Windows home drive« and »Windows home path« on the same »Account« tab where you found the »UNIX home directory« setting. If you use e.g. H: as the »Windows home drive« and »\servername\username« as the »Windows home path« then you should be set.

If you do NOT want to change the »UNIX home directory« but you DO want a drive on Windows be mapped to a different folder then create a new share in the UDM, create folders for each user in that share and use »\servername\name-of-new-share\username« as the »Windows home path« property in the user’s account settings.

Note that you have to set both the »Windows home drive« and »Windows home path« properties for each user. In earlier Samba versions you could define those globally, but that doesn’t work in an Active Directory style domain anymore.

Kind regards,
mosu


#5

Sorry that I could be more clear but I understand it now. I’m tryng to build a fileserver wich holds files ( roaming profiles ) on NETAPP SAN and I dont want to put /home on network share. But I have idea now how to do it. Thnx.


#6

Hey,

no problem. Note that in the UDM you can set the profile path independently from the home directory to something like »\someotherserver\profiles\janesmith« or whatever matches your environment.

Kind regards,
mosu


#7

But now I’m against another problem. /home/ is created when user is created but /some/other/location is not and I have to do it manually or is there a possibility that when user is created execute some script?


#8

Hey,

The user’s home directory is created automatically whenever the user logs in to the system via a PAM module. If you want that other directory to be created as well you can either change the user’s home directory (which doesn’t seem to be what you actually want judging by what you’ve written) or you can write your own Directory Listener module in Python that hooks into Univention’s Directory Listener mechanism to react to changes in the LDAP directory. There’s developer documentation available for that, and it isn’t that hard to do.

You could also write a simple shell script that fetches the list of accounts via »getent passwd« (or »udm users/user list«) and creates directories accordingly. Schedule its execution via CRON, e.g. every 15 minutes, and you have a somewhat usable mechanism that lags user creation only a bit. The downside is that it cannot react to user renames as well as a listener module could – a listener module can determine whether a new user name is indeed a new entry or just a renamed user, and in the latter case it also knows the former user name so that it can rename the profile directory, too.

Other than that I don’t know of a mechanism that provides what you need out of the box.

Kind regards,
mosu