- Set up users, guests and groups on Mac
- Add a user
- Create a group
- Convert a standard user to an administrator
- Let occasional users log in as guests
- Customise the login experience
- Изменение параметров раздела «Пользователь» в настройках пользователей и групп на Mac
- List User Accounts on Mac from Command Line
- How to List All User Accounts on a Mac from Command Line
- View All Users & Accounts on a Mac
- Show User Accounts Only
- Show All User Accounts, User Directories, & User GECOS Info on a Mac
- Related
- Enjoy this tip? Subscribe to our newsletter!
- Thank you!
- Related articles:
- 17 Comments
Set up users, guests and groups on Mac
If your Mac has multiple users, you should set up an account for each person so each can personalise settings and options without affecting the others. You can let occasional users log in as guests without access to other users’ files or settings. You can also create groups. You must be an administrator of your Mac to perform these tasks.
Add a user
On your Mac, choose Apple menu
> System Preferences, then click Users & Groups.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Click the Add button below the list of users.
Click the New Account pop-up menu, then choose a type of user.
Administrator: An administrator can add and manage other users, install apps and change settings. The new user you create when you first set up your Mac is an administrator. Your Mac can have multiple administrators. You can create new ones, and convert standard users to administrators. Don’t set up automatic login for an administrator. If you do, someone could simply restart your Mac and gain access with administrator privileges. To keep your Mac secure, don’t share administrator names and passwords.
Standard: Standard users are set up by an administrator. Standard users can install apps and change their own settings, but can’t add other users or change other users’ settings.
Sharing Only: Sharing-only users can access shared files remotely, but can’t log in to or change settings on the computer. To give the user permission to access your shared files or screen, you may need to change settings in the File Sharing, Screen Sharing or Remote Management pane of Sharing preferences. See Set up file sharing and Share the screen of another Mac.
For more information about the options for each type of user, click the Help button in the lower-left corner of the dialogue.
Enter a full name for the new user. An account name is generated automatically. To use a different account name, enter it now — you can’t change it later.
Enter a password for the user, then enter it again to verify. Enter a password hint to help the user remember their password.
Click Create User.
Depending on the type of user you create, you can also do any of the following:
For an administrator, select “Allow user to administer this computer”.
For an administrator, select “Allow user to reset a password using Apple ID”.
Use Sharing preferences to specify whether the user can share your files and share your screen.
For information about Apple’s privacy policy, see the Apple Privacy Policy website.
If your Mac or Magic Keyboard has Touch ID, a new user can add a fingerprint after logging in to the Mac.
Create a group
A group allows multiple users to have the same access privileges. For example, you can grant a group specific access privileges for a folder or a file, and all members of the group have access. You can also assign a group specific access privileges for each of your shared folders.
On your Mac, choose Apple menu
> System Preferences, then click Users & Groups.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Click the Add button below the list of users.
Click the New Account pop-up menu, then choose Group.
Give the group a name, then click Create Group.
Select each user and group you want to add to the new group.
Use Sharing preferences to specify whether the group members can share your files and share your screen.
Convert a standard user to an administrator
On your Mac, choose Apple menu
> System Preferences, then click Users & Groups.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Select a standard user or managed user in the list of users, then select “Allow user to administer this computer”.
Let occasional users log in as guests
You can let other people use your Mac temporarily as guest users without adding them as individual users.
Guests don’t need a password to log in.
Guests can’t change user or computer settings.
Guests can’t log in remotely when remote login is turned on in Sharing preferences.
Files created by a guest are stored in a temporary folder, but that folder and its contents are deleted when the guest logs out.
Guest access works with the Find My app to help you find your Mac if you lose it. You can locate your Mac if someone finds it, logs in as a guest, and then uses Safari to access the internet. See Set up the Find My app to locate a missing Mac.
Note: If FileVault is turned on, guests can access Safari but can’t access your encrypted disk or create files.
On your Mac, choose Apple menu
> System Preferences, then click Users & Groups.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Select Guest User in the list of users.
Select “Allow guests to log in to this computer”.
If you like, select “Limit Adult Websites” to prevent the guest from accessing adult websites.
To let guests use your shared folders from another computer on the network, select “Allow guest users to connect to shared folders”.
Customise the login experience
If you are an administrator, you can specify how the login window looks to all the other users.
On your Mac, choose Apple menu
> System Preferences, click Users & Groups, then click Login Options.
If the lock at the bottom left is locked , click it to unlock the preference pane.
Click the “Automatic login” pop-up menu, then choose a user or choose Off.
If you choose a user, then whenever the Mac starts up, that user is automatically logged in. If you choose Off, then at startup the Mac opens a login window showing all the users. Automatic login takes effect the next time you restart the Mac.
Note: Automatic login allows anyone to access your Mac simply by restarting it. If automatic login is enabled, make sure your Mac doesn’t automatically log in an administrator. When FileVault is turned on, automatic login is disabled.
Select the options you want. If you have any questions, click the Help button for detailed information.
To permit new users to access your shared files or screen, you may need to change settings in the File Sharing, Screen Sharing or Remote Management pane of Sharing preferences. See Set up file sharing and Share the screen of another Mac.
To open Sharing preferences, choose Apple menu
Источник
Изменение параметров раздела «Пользователь» в настройках пользователей и групп на Mac
Используйте панель «Пользователь» в разделе «Пользователи и группы» в Системных настройках, чтобы менять параметры своей учетной записи на Mac. Если Вы являетесь администратором компьютера Mac, Вы также можете менять параметры других пользователей этого компьютера. Узнайте, как настроить нового пользователя.
Чтобы изменить эти настройки, выберите меню Apple
> «Системные настройки», затем нажмите «Пользователи и группы». Выберите пользователя слева. Затем, если Вы выбрали себя, нажмите «Пароль» у верхнего края окна. Если другой пользователь вошел в систему Mac, Вы не сможете его выбрать.
Важно! Если Вы забыли пароль для входа или Вам нужна помощь с его вводом, обратитесь к следующим разделам.
Примечание. Если в левом нижнем углу панели отображается закрытый замок , нажмите его, чтобы разблокировать панель настроек.
Нажмите картинку для ее редактирования, затем выберите новую картинку.
Используйте картинку, входящую в macOS. Нажмите «По умолчанию», затем выберите картинку.
Сделайте фотографию при помощи Mac. Нажмите «Камера». Когда будете готовы, нажмите «Сделать снимок».
Используйте картинку из приложения «Фото». Нажмите «Фото». Чтобы отобрать фотографии по времени, месту или альбому, нажмите стрелку под фотографиями и выберите группу фотографий. Выберите изображение и нажмите «Далее».
Вместо того чтобы нажимать изображение, Вы можете перетянуть файл из окна Finder на изображение пользователя.
Нажмите эту кнопку, чтобы изменить пароль для входа в систему и подсказку к паролю. Чтобы открыть Ассистент пароля, нажмите кнопку с изображением ключа рядом с полем «Пароль». См. раздел Советы по созданию надежных паролей.
Нажмите «Открыть», чтобы посмотреть и отредактировать свою карточку в Контактах. Доступно только для того пользователя, который в данный момент находится в системе.
Разрешить пользователю сбрасывать пароль с Apple ID
Позволяет пользователю сменить свой пароль от компьютера Mac при входе в систему, введя свой Apple ID и пароль. Этот параметр можно использовать, только если у пользователя настроена служба iCloud на данном компьютере Mac. Однако параметр будет недоступен, если функция FileVault включена и настроена таким образом, чтобы пользователь мог сбросить свой пароль при загрузке системы, используя Apple ID.
Разрешить этому пользователю администрировать компьютер
Пользователь становится администратором этого компьютера Mac.
Добавление и удаление
Чтобы добавить нового пользователя или группу пользователей, нажмите кнопку «Добавить» и введите данные нового пользователя или группы. Чтобы удалить пользователя или группу, выберите их в списке и нажмите кнопку «Удалить»
. См. раздел Удаление пользователя или группы.
О политике конфиденциальности Apple см. на странице Политика конфиденциальности Apple.
Об изменении или обновлении имени учетной записи см. в статье на сайте поддержки Apple Изменение имени учетной записи и папки пользователя в ОС macOS.
Чтобы дать разрешение пользователю на доступ к файлам или экрану, к которым открыт общий доступ, необходимо изменить настройки на панелях «Общий доступ к файлам», «Общий экран» или «Удаленное управление» в настройках общего доступа. См. разделы Настройка общего доступа к файлам и Общее использование экрана другого компьютера Mac.
Источник
List User Accounts on Mac from Command Line
Mac administrators may find themselves in a situation where they need to display a list of all user accounts on a particular Mac by way of the command line. We’ll review a few methods for advanced individuals to list all accounts, both user and system, on any Mac with any version of Mac OS X system software.
A few preliminary basic approaches to this would be to access the login screen or to list the contents of the /Users directory, though if a user account is hidden then it would not display at the login screen and it’s equally simple to obfuscate a user from the /Users folder. Additionally, the existence of a name in the /Users/ directory is not foolproof, because you can delete a user account but preserve that users home directory. As a result, while those approaches may be appropriate for the casual Mac user looking to show what users they have on a computer, neither of those methods are particularly sufficient for most admin needs. But, by turning to the command line you can reveal all user accounts on a Mac, whether they are general user accounts of active users, admin accounts, as well as any system account.
How to List All User Accounts on a Mac from Command Line
Open the Terminal if you haven’t done so already, either on the local machine you want to list user accounts for, or by connecting to a remote Mac you’d like to see the user accounts on. We’ll then use the ‘dscl’ command, which works in all versions of Mac OS X system software.
View All Users & Accounts on a Mac
dscl . list /Users
The benefit (or trouble) with this approach is that it lists not only all user accounts on a Mac but it also shows every daemon and server process account. This would include usernames like Paul, Bob, Jill, but also daemons, system accounts, and process users like networkd, windowserver, daemon, nobody, root, _spotlight, _ard, _appserver, _iconservices, and many more.
If the complete list of users is thus undesirable, you can easily exclude all the _underscore daemon and process accounts by running the output through grep, as we’ll show next.
Show User Accounts Only
dscl . list /Users | grep -v ‘_’
This command will filter out any of the _ underscore prefixed daemon users, which are not actually user accounts. You’ll get a much shorter list of user names returned as a result, but you’ll still find three user names included that are not typical user accounts, but are normal to be found on Mac OS X installs; daemon, nobody, and root.
Show All User Accounts, User Directories, & User GECOS Info on a Mac
Another approach would be to show and list a detailed account list of user accounts, the associated user account directory, and the user account GECOS info (which is usually a description of the account or a full user name). If you find yourself wondering what on earth some of the system accounts and process user ID accounts in the aforementioned lists are, this approach offers more details, including the gecos description for each account (for example, _qtss user is the QuickTime Streaming Server daemon)
dscacheutil -q user
The output of that command will be rather extensive, so you may want to pipe the result through more or less or redirect it into a text file for easier parsing.
There are likely other means of displaying all user accounts on a Mac, regardless of system version, if you know of an effective of informative method not covered here, do share it in the comments.
Related
Enjoy this tip? Subscribe to our newsletter!
Get more of our great Apple tips, tricks, and important news delivered to your inbox with the OSXDaily newsletter.
Thank you!
You have successfully joined our subscriber list.
Related articles:
17 Comments
I love a good know-it-all. 😭😭
I wonder why nobody answers the non-command-line guys question with the first normal-mac-user answer: use the “Users and Groups” pane of the “System Preferences” to list, control and manage your Mac users and groups, if you’re not prepared for the unix-style mess that is the command-line.
Furthermore, a “Mac” user is NOT a “unix/posix” user. It bases on it – but has much more (data, definitions, home directory, provisioning, profiles etc.) that is beyond the scope of these command-lines. trying to Create or Delete users from the command-line would really mess things up, and leave lots of orphaned junk on your Mac. DO NOT do that from the command-line unless you know very well what you are doing – and even then – that’s a bad idea. the only time I would do that, is if I need to control a remote machine and I only have an ssh login (terminal + shell) to the remote machine. any other way – Apple’s UI (and its automation) provide a better solution.
Next – if you’re talking about those _prefixed_usernames as “process” or “daemon” you should also give at least a sentence about what these are (special users set up for background-processes that exist and run outside the context of any normal “Mac user”, and even when no Mac user is logged in. These ‘users’ have the minimal access and capabilities for the need of the processes running “under” them.
Also, I didn’t really understand the last “GECOS Info” thing – please explain what it is, aside from providing the command-line. It also emits LOTS of information that would be nice if explained.
I’ve tried to add a user from a basic bash line and single user mode and all variations of prompts dscl/ -create/User “etc” on my macbook and every time I get “command not found” any suggestions?
I am confused, when i typed “dscacheutil -q user”. I got deamons and roots, and some of the other users were anonymous. I dont exactly know, what a deamon is, and what a root user is. Can someone please tell me why i do have more than 59 accounts on my mac, is it bad?
Listing all accounts on a Mac will show many that are NOT users, but daemons etc. Those are for system processes, those are not user accounts. Root is super user, every Mac has root.
User accounts are found in the /Users directory of Mac OS at your root Macintosh folder. That’s what someone is logging in as in most cases.
I just wonder why you’re even looking at this if you’re confused by it, what do you aim to achieve? If you don’t know what any of this is, it’s not relevant to you. It’d be like reading about the specifics of rocket science or brain surgery, probably not relevant to you either.
this is how learning works
I just wonder what you aim to acheive by being such a prick?
Great post. Very helpful. I didn’t like the nobody account either. I found it in a dialogue box under privileges, groups, nobody = admin. Previous to I found users, my user name, and then under my selected user name it said admin. This made sense. I am using High Sierra v 10.13 .. Thanks again for the terminal commands, I can add them to my little OS X cheat sheet / notebook. Maybe I will write a book one day!
Excellent suggestions, thank you all. Can someone tell me why Groupmembership would state: root (and my computer name here). I never activated “enable root”.
How delete users account except two users account ? For example :
I have 4 users account/
1-admin
2-usertemplate
3-user1
4-user2
I want to delete all users except : admin & usertemplate?
What’s the good syntax?
dscl . delete /Users/ !(admin | usertemplate) don’t work?
What is a good syntax ?
If you want to delete a user you need to do the following be in a root prompt or do sudo
sudo dscl . -delete /Users/$username
This will delete the user from the directory. Then if you want to delete the user folder you can do
sudo rm -rf /Users/$username
I have listed the users on my mac suspecting that someone had hacked my Mac as it had turned out to be very slow.
I got many users with “_” before them, I got root, nobody daemon.
That is in addition to my created users. Does this mean that everything is ok, or should I start worrying!
Not sure, but I think it’s an idea to run this and maybe share the results with me or someone who can ger a picture of the results: http://etrecheck.com
Maybe post at the Apple Discussions forum?
https://discussions.apple.com
If the computer is unusually slow it’s probably some process that’s running or the drive is reading and/or writing. Or a bad file system.
Just checking something as I am not a command line user.
When I use dscl . list /Users | grep -v ‘_’
I get an account called “nobody”. Who is this and should I get rid of it?
NOBODY owns no files, is NOT in a privileged group, and has ONLY the permissions that any user would have (less the user directory, and control of those files) IOW, it’s a process account. It’s common on UN*X type systems.
LEAVE NODOBY ALONE.
If you have Fast User Account Switching enabled in Mac OS (X) you can see the list of possible user names on the Mac by clicking on the name or icon in the upper right corner.
I use a different trick for this to list admin account / admin users
dscl . -read /Groups/admin GroupMembership
WIll list all administrator accounts on the Mac
Источник