Домашний каталог пользователя windows

Understanding how to access the home directory, often known as the user profile directory, is fundamental for efficient navigation and management of the individual files, settings, and configurations on a Windows system. The home directory serves as a centralized hub where the personalized data resides, encompassing documents, downloads, desktop items, app settings, and much more. This tutorial provides 2 methods how to get home directory on Windows.

Method 1 — CMD

To obtain the home directory using Command Prompt (CMD), we can utilize the echo command along with the %USERPROFILE% environment variable, which holds the path to the user’s home directory.

echo %USERPROFILE%

Output example:

C:\Users\John

Method 2 — PowerShell

To retrieve the home directory using PowerShell, we can utilize the $HOME automatic variable, which holds the path to the current user’s home directory.

$HOME

Материал из РУВИКИ — свободной энциклопедии

Домашний каталог — это личный каталог пользователя в операционной системе, где находятся его данные, настройки и т. д.

Название и расположение домашнего каталога зависит от типа операционной системы, например, в Microsoft Windows он находится в каталоге Users (в Windows XP — Documents and Settings), а в Linux — в каталоге /home, и имеет название, соответствующее имени пользователя системы.
Например,
C:\Users\Маша для Windows
или
/home/masha для UNIX-систем.

Система Путь Переменная
Microsoft Windows NT <root>\WINNT\Profiles\<username> %UserProfile%
Microsoft Windows 2000, XP and 2003 <root>\Documents and Settings\<username>
Microsoft Windows Vista and 7 <root>\Users\<username>
Unix-Based[1] <root>/home/<username> $HOME и ~/
Unix-Derived /var/users/<username>
/u01/<username>
/usr/<username>
/user/<username>
/users/<username>
SunOS / Solaris /export/home/<username>
Linux (FHS) /home/<username>
AT&T Unix (оригинальная версия) <root>/usr/<username> $HOME
Mac OS X /Users/<username> $HOME и ~/, и путь к домашнему каталогу (в AppleScript)
OpenVMS <device>:[<username>] SYS$LOGIN

Подробнее см. FHS

В Unix-подобных операционных системах по умолчанию домашние каталоги пользователей расположены в каталоге /home (от англ. home — дом, домашний). В домашних каталогах хранятся документы и настройки пользователя. Разделение на системные (например, /etc, /bin) и пользовательские каталоги необходимо в основном для упрощения резервного копирования и безопасности.

Домашние каталоги пользователей определяются в файле /etc/passwd. Пример:

nataly:x:1001:1001::/home/nataly:/bin/bash

В этом примере пользователю nataly назначен домашний каталог /home/nataly.

Структура внутри каталога /home может быть различной. Например, если на сервере хранится много домашних каталогов, то имеет смысл размещать их в подкаталогах первой буквы имени пользователя (/home/n/nataly).

Каталог /home удобно располагать на отдельном разделе жёсткого диска, когда на компьютере установлено несколько Unix-подобных ОС; в этом случае каждая ОС монтирует этот раздел в /home.

Ubuntu и некоторые другие дистрибутивы Linux предлагают возможности по шифрованию домашних каталогов (используя Ecryptfs), в том числе в процессе установки системы[2].

Пример[править | править код]

ml@lantern /home $ ls -l
total 8
drwxr-xr-x  26   nataly  nataly  872   2008-08-06 21:22  nataly
drwxr-xr-x  148  ml      ml      7224  2008-08-29 12:13  ml

Как видно из примера, этот /home содержит в себе две домашние каталоги двух разных пользователей — ml и nataly. Причём у каждого из этих каталогов соответствующие идентификатор пользователя (UID) и идентификатор группы (GID). Это означает, что ml не может попасть в домашний каталог nataly и наоборот. Если только на каталоге не установить режим (chmod), который позволит чтение всем, а не только владельцу и группе.

/root[править | править код]

Домашний каталог суперпользователя (root) находится в /root, а не в /home/root. Это сделано для повышения надёжности системы: в подавляющем большинстве случаев каталог /home находится на отдельном диске, если же его файловая система будет повреждена, вход в систему и восстановление будут сильно затруднены. Учётная запись root используется для администрирования системы, поэтому /root обычно располагается на том же разделе, где и система (домашний каталог пользователя root обычно не содержит представляющих ценность личных файлов).

  1. «Home Directory Definition». Дата обращения: 25 марта 2013. Архивировано 16 июля 2017 года.
  2. Jang, M. Security Strategies in Linux Platforms and Applications. — Jones & Bartlett Learning, 2010. — P. 127—128. — ISBN 9780763791896.
  • Каталог

Материал из энциклопедии Руниверсалис

Домашний каталог — это личный каталог пользователя в операционной системе, где находятся его данные, настройки и т. д.

Название и расположение домашнего каталога зависит от типа операционной системы, например, в Microsoft Windows он находится в каталоге Users (в Windows XP — Documents and Settings), а в Linux — в каталоге /home, и имеет название, соответствующее имени пользователя системы.
Например,
C:\Users\Маша для Windows
или
/home/masha для UNIX-систем.

В различных операционных системах

Система Путь Переменная
Microsoft Windows NT <root>\WINNT\Profiles\<username> %UserProfile%
Microsoft Windows 2000, XP and 2003 <root>\Documents and Settings\<username>
Microsoft Windows Vista and 7 <root>\Users\<username>
Unix-Based[1] <root>/home/<username> $HOME и ~/
Unix-Derived /var/users/<username>
/u01/<username>
/usr/<username>
/user/<username>
/users/<username>
SunOS / Solaris /export/home/<username>
Linux (FHS) /home/<username>
AT&T Unix (оригинальная версия) <root>/usr/<username> $HOME
Mac OS X /Users/<username> $HOME и ~/, и путь к домашнему каталогу (в AppleScript)
OpenVMS <device>:[<username>] SYS$LOGIN

В Unix-подобных операционных системах

Подробнее см. FHS

В Unix-подобных операционных системах по умолчанию домашние каталоги пользователей расположены в каталоге /home (от англ. home — дом, домашний). В домашних каталогах хранятся документы и настройки пользователя. Разделение на системные (например, /etc, /bin) и пользовательские каталоги необходимо в основном для упрощения резервного копирования и безопасности.

Домашние каталоги пользователей определяются в файле /etc/passwd. Пример:

nataly:x:1001:1001::/home/nataly:/bin/bash

В этом примере пользователю nataly назначен домашний каталог /home/nataly.

Структура внутри каталога /home может быть различной. Например, если на сервере хранится много домашних каталогов, то имеет смысл размещать их в подкаталогах первой буквы имени пользователя (/home/n/nataly).

Каталог /home удобно располагать на отдельном разделе жёсткого диска, когда на компьютере установлено несколько Unix-подобных ОС; в этом случае каждая ОС монтирует этот раздел в /home.

Ubuntu и некоторые другие дистрибутивы Linux предлагают возможности по шифрованию домашних каталогов (используя Ecryptfs), в том числе в процессе установки системы[2].

Пример

ml@lantern /home $ ls -l
total 8
drwxr-xr-x  26   nataly  nataly  872   2008-08-06 21:22  nataly
drwxr-xr-x  148  ml      ml      7224  2008-08-29 12:13  ml

Как видно из примера, этот /home содержит в себе две домашние каталоги двух разных пользователей — ml и nataly. Причём у каждого из этих каталогов соответствующие идентификатор пользователя (UID) и идентификатор группы (GID). Это означает, что ml не может попасть в домашний каталог nataly и наоборот. Если только на каталоге не установить режим (chmod), который позволит чтение всем, а не только владельцу и группе.

/root

Домашний каталог суперпользователя (root) находится в /root, а не в /home/root. Это сделано для повышения надёжности системы: в подавляющем большинстве случаев каталог /home находится на отдельном диске, если же его файловая система будет повреждена, вход в систему и восстановление будут сильно затруднены. Учётная запись root используется для администрирования системы, поэтому /root обычно располагается на том же разделе, где и система (домашний каталог пользователя root обычно не содержит представляющих ценность личных файлов).

Примечания

  1. «Home Directory Definition». Дата обращения: 25 марта 2013. Архивировано 16 июля 2017 года.
  2. Jang, M. Security Strategies in Linux Platforms and Applications. — Jones & Bartlett Learning, 2010. — P. 127—128. — ISBN 9780763791896.

См. также

  • Каталог

This is how you can create Home Folders for your user in Active Directory (AD) in Windows Domain Controller (DC). You can create folders for multiple users (even hundreds of users) with few clicks by following these steps. For a video demonstration, please check my YouTube video.

I used Windows Server 2022 for this demonstration but these same steps can be followed on Windows Server 2019. Please note that you must be logged into the Windows Server with an account with Administrator privileges to perform some of these actions. If you are not logged in as an admin, you must have access to an admin account in order to enter those credentials when requested (pop-up)).

Video Guide

Step-by-Step Guide

Create a folder to be shared within your network. This is just like creating any other folder. Right click on any empty space of a main folder, New > Folder or you can use the “New folder” option under Home tab of the File Explore. Then right click on the folder you created after naming it appropriately (this name can contain spaces /whitespaces, but in proceeding steps, you can change the network folder name to remove white spaces) and select Properties to open folder Properties window as shown below.

Folder: Right click data-lazy-src=

Folder: Right click > Properties

Under Properties, negative to the Sharing tab and then click Advanced Sharing…. You must be an Administrator (logged in with an admin account or your have admin account credentials that can be used) to perform this action. This is also the case for few of the proceeding steps in this guide.

Navigate to Sharing tab within folder Properties.

Navigate to Sharing tab within folder Properties.

Under the Advanced Sharing window, select Share this folder and now you can update the Share name: under the Settings section. This is the name in which the network will use to share this folder. As mentioned above, it is not recommended to have whitespaces when sharing on the network. Here in this example, I changed the Share name: to “Home_Folders”. The special character, $ at the end of this name makes this folder invisible to your users. This is done for security reasons. The users do not require access to this main or “root” folder. What they need access is their user folders within this folder. Hence, by adding the $ character at the end of the folder name, we can hide this root folder.

Share folder settings and c Comments.

Share folder settings and c Comments.

You can also add a comment under Comments: section. This has no operational value but rather used for system administrators to keep track of folders. Click Apply.

Click and open the Permissions windows (button right bellow the Comments: section. Under Share Permissions, you will see a AD Group titled “Everyone”. Highlight/select this group and change the Permissions to Full Control. Then click Apply and OK.

Change Share Permissions for Everyone group.

Change Share Permissions for Everyone group.

Navigate to the next tab in folder Properties, Security. In the Security tab, open Advanced Security Settings window by clicking the Advanced button near the bottom.

Folder Properties: Security Tab

Folder Properties: Security Tab

Under the Advanced Security Settings window, click Disable inheritance.

Advanced Security Settings: Disable incoherence.

Advanced Security Settings: Disable incoherence.

Select Convert inherited permissions into explicit permissions on this object on the Block Inheritance warning pop-up.

Convert inherited permissions into explicit permissions on this object.

Convert inherited permissions into explicit permissions on this object.

Select Users groups, Read & execute and Special and use the Remove button to remove them from the Permissions entries. Click Apply and OK.

Remove Users groups.

Remove Users groups.

Go back to the Sharing tab and copy the Network Path: we created earlier by highlighting it, right click and copy. This will copy that information to the clipboard and you can pate this information in our next step.

Sharing tab and copy the Network Path.

Sharing tab and copy the Network Path.

Open Active Directory Users and Computers and navigate to the Organization Unit (OU) or Group or area in which you already have users. Sort the columns by “Type” so that you will have all your AD users right next to each other.

Once sorted, you now can select all the users without highlighting the Groups. Select all users and then right click (while the users are selected) and open Properties. This will open up the Properties for Multiple Items window.

Open AD Users and Computers and select all users.

Open AD Users and Computers and select all users.

In the Properties for Multiple Items window, navigate to the Profile tab, select Home folder and choose Connect:. Now you can choose a drive latter for Home Folder for each user. Typically, we use the letter H for Home Folders as an unwritten rule of thumb. But you may select any drive letter from the drop down menu as long as it will not create a conflict for any of your users. Under the To: section, pate the “root” Home Folder location we created few steps ago. Then at the end of it, please insert %username%. This will result in creation of Home Folders for each highlighted user with their own user name. Remember, the Home Folders shared root folder path typical syntax to auto generate folders based on individual user Active Directory logon name: \\SRVER_NAME\ROOT_FOLDER_LOCATION\%username%

Properties for Multiple Items: Profile tab.

Properties for Multiple Items: Profile tab.

Notice the Home Folder name is based on the AD User Profile logon name (check under “Account” tab for logon name). If you would like to know how to create users and basic overview of logon names and profiles, please check this video.

Home Folder name is based on the AD User Profile logon name.

Home Folder name is based on the AD User Profile logon name.
The Account tab in user profile Properties with logon name.

The Account tab in user profile Properties with logon name.

Folders are automatically created based on the logon name of each AD user account under the shared folder for Home Folders. This process occurred when we added the \\SRVER_NAME\ROOT_FOLDER_LOCATION\%username% in our previous step.

Folders based on the logon name.

Folders based on the logon name.

Specific Permissions – Video

If you like to create Home Folders for new users with specific permissions, please watch the following tutorial video. The steps are very similar what is described above.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Установка диспетчера hyper v на windows 10
  • Как пересобрать образ windows
  • Windows 10 retail что значит
  • Где хранятся образы docker windows
  • Драйвера для asus x551m windows 10