Userdel Command Options For Mac

The userdel command modifies the system account files, deleting all entries that refer to loginname. The named user must exist. Question: Q: Windows 'Run' Command on a Mac Is there a Mac equivalent to the Windows 'Run' option (in the Start Menu)? I need to access a server that looks like etc.etc.blah.blah mm-hmm/ and I'm not sure how.

Name

userdel - delete a user account and related files

Synopsis

userdel [options] LOGIN

Description

The userdel command modifies the system account files, deleting all entries that refer to the user name LOGIN. The named user mustexist.

Options

The options which apply to the userdel command are:

-f, --force

This option forces the removal of the user account, even if the user is still logged in. It also forces userdel to remove the user's home directoryand mail spool, even if another user uses the same home directory or if the mail spool is not owned by the specified user. If USERGROUPS_ENAB is definedto Macbookyes in /etc/login.defs and if a group exists with the same name as the deleted user, then this group will be removed, even if it is still the primarygroup of another user.

Note: This option is dangerous and may leave your system in an inconsistent state.

-h, --help
Display help message and exit.
-r, --remove
Files in the user's home directory will be removed along with the home directory itself and the user's mail spool. Files located in other file systems willhave to be searched for and deleted manually.

The mail spool is defined by the MAIL_DIR variable in the login.defs file.

-Z, --selinux-user
Remove SELinux user assigned to the user's login from SELinux login mapping.

Userdel User Does Not Exist

Configuration

The following configuration variables in /etc/login.defs change the behavior of this tool:

MAIL_DIR (string)

The mail spool directory. This is needed to manipulate the mailbox when its corresponding user account is modified or deleted. If not specified, acompile-time default is used.
MAIL_FILE (string)
Defines the location of the users mail spool files relatively to their home directory.
The MAIL_DIR and MAIL_FILE variables are used by useradd, usermod, and userdel to create, move, or delete the user's mailspool.

If MAIL_CHECK_ENAB is set to yes, they are also used to define the MAIL environment variable.

MAX_MEMBERS_PER_GROUP (number)

Maximum members per group entry. When the maximum is reached, a new group entry (line) is started in /etc/group (with the same name, same password, and sameGID).

The default value is 0, meaning that there are no limits in the number of members in a group.

This feature (split group) permits to limit the length of lines in the group file. This is useful to make sure that lines for NIS groups are not larger than1024 characters.

If you need to enforce such limit, you can use 25.

Note: split groups may not be supported by all tools (even in the Shadow toolsuite). You should not use this variable unless you really need it.

USERDEL_CMD (string)
If defined, this command is run when removing a user. It should remove any at/cron/print jobs etc. owned by the user to be removed (passed as the firstargument).

The return code of the script is not taken into account.

Here is an example script, which removes the user's cron, at and print jobs:

echo 'Usage: $0 username'

exit 1

fi

# Remove cron jobs.
crontab -r -u $1

# Remove at jobs.
# Note that it will remove any jobs owned by the same UID,
# even if it was shared by a different username.
AT_SPOOL_DIR=/var/spool/cron/atjobs
find $AT_SPOOL_DIR -name '[^.]*' -type f -user $1 -delete ;

# Remove print jobs.
lprm $1

# All done.
exit 0

USERGROUPS_ENAB (boolean)
Enable setting of the umask group bits to be the same as owner bits (examples: 022 -> 002, 077 -> 007) for non-root users, if the uid is the same asgid, and username is the same as the primary group name.

If set to yes, userdel will remove the user's group if it contains no more members, and useradd will create by default a group with thename of the user.

Files

/etc/group

success
1
can't update password file
2
invalid command syntax
6
specified user doesn't exist
8
user currently logged in
10
can't update group file
12
can't remove home directory

Caveats

userdel will not allow you to remove an account if there are running processes which belong to this account. In that case, you may have to kill thoseprocesses or lock the user's password or account and remove the account later. The -f option can force the deletion of this account.

You should manually check all file systems to ensure that no files remain owned by this user.

You may not remove any NIS attributes on a NIS client. This must be performed on the NIS server.

If USERGROUPS_ENAB is defined to yes in /etc/login.defs, userdel will delete the group with the same name as the user. To avoidinconsistencies in the passwd and group databases, userdel will check that this group is not used as a primary group for another user, and will justwarn without deleting the group otherwise. The -f option can force the deletion of this group.

See Also

chfn(1), chsh(1), passwd(1), login.defs(5), gpasswd(8), groupadd(8), groupdel(8), groupmod(8),useradd(8), usermod(8).

Referenced By

groupmems(8)

Macs come in all shapes and sizes, but you turn all of them on and off, and do things with the keyboard and mouse or trackpad the same way. This Cheat Sheet of timesaving keyboard shortcuts, mouse and trackpad actions, Mac-related websites, and definitions can help you get the most from your Mac right away.

Using Mac Special Feature Keys

Newer Macs feature keyboards with a row of dedicated special feature keys marked with descriptive icons that also double as function (Fn) keys. For instance, the fifth key from the left is the one you press to open Launchpad, which displays all the applications on your Mac. Some special feature keys evoke a second special feature when you hold down the Fn key and then press the special feature key.

From the Apple menu, choose System Preferences and then click the Keyboard icon to find all the default key command shortcuts (under the Shortcuts tab), turn on those you want to use, and then edit the key combinations to something easier for you.

Here are five Mac special feature keys you can press to help you work with and switch between multiple Mac application windows you’re running at the same time.

Command

Userdel Command Linux

Userdel Command Options For Mac
KeystrokeCommand
Mission Control (F3)Displays Mission Control, which lets you switch between
multiple desktops.
Command+TabDisplays icons of all running applications.
Fn+Volume Down (F11)Hides all windows to show the Desktop.
Launchpad (F4)Displays Launchpad and all the applications on your Mac.
Fn+Volume Up (F12)Displays Dashboard.

Common Mac Application Shortcut Keystrokes

No matter what application you’re running on your Mac, you can usually speed up using an application by performing a Mac keyboard shortcut rather than use the mouse or trackpad to point to a menu and select a command. The following table lists the most common Mac keyboard shortcuts that can speed up working with 99.99999 percent of all Mac applications.

KeystrokeCommand
Command+NCreate a new file.
Command+OOpen an existing file.
Command+SSave an active file.
Command+FFind text in an active file.
Command+ASelect all items in a window.
Command+CCopy the selected item.
Command+XCut the selected item.
Command+VPaste the most recently cut or copied item.
Command+PPrint.
Command+ZUndo the last command.
Command+WClose the active window.
EscCancel dialogs and closes pull-down menus.
Command+QQuit an application.

Mac Shortcuts for International Letters and Symbols

Userdel

Userdel Command Options For Mac Shortcut

When writing, you may need to use a symbol or a letter with a diacritical mark, such as an accent (à) or a tilde (ñ). Holding down any of the letters in the following table opens a pop-up window with the variations of that letter and a number under each one. Type the number, and the variation appears in your document. For example, hold down A and then press 1 to type à. It works for uppercase letters as well.

These variations appear when you use the U.S. English keyboard. If you add a keyboard for another language, you may see more or different variations. To add a keyboard, go to the Apple menu and choose System Preferences; then click the Keyboard icon. Click the Input Source tab and then click the add button (+) at the bottom left. Select the language you want, and then click the Add button. Select the Show Input Menu in Menu Bar check box. When you’re working in a document and want to switch to a different language, click the Input menu icon in the status bar and select the language you want to use.

Userdel Command Options For Mac Windows 7

LetterVariations
aà á â ä æ ã å �?
cç ć �?
eè é ê ë ė ē ę î ï í î ì
iî ï í î ì
lł
nñ ń
oô ö ò ó œ ø ō õ
sß ś š
uû ü ù ú ū
yÿ
zž ź ż

Some common symbols are quickly accessed with the following key combinations:

CombinationResult
Option-2
Option-4¢
Option-8
Option-r®
Option-g©
Option-Shift-

To see all the key combinations, go to the Apple menu and choose System Preferences and then Keyboard. Click the Input Sources tab, and then select the Show Input Menu in Menu Bar check box. Close System Preferences. An icon for the Input Menu appears on the status bar at the top of your screen. Click the Input Menu icon and choose Show Keyboard Viewer. A graphic representation of the keyboard appears on your screen. Do one of the following three actions: Hold Shift, hold Option, or hold Shift+Option. The keyboard changes to show the letter or symbol that will be typed when you now hold Shift, Option, or Shift+Option and type a letter or number.

There are five gold option keys. If you hold down the Option key, press one of the gold keys, release the Option key, and then press another letter, the accent associated with the gold key appears on the letter you typed. For example, press Option+E, and then type a. The result is á.

Userdel Command Options For Mac

Mac Mouse and Trackpad Actions

Using your Mac’s mouse or trackpad can be a real drag — in a good way! That’s because drag (as well as click and Control-click) describes how you use your Mac’s mouse and trackpad to do things with windows, icons, and other items on the screen. The following table lists Mac mouse and trackpad action terms and what they mean.

ActionHow to Do ItPurpose
ClickPress the mouse button down and release. Press the trackpad bar
or the lower part of the trackpad if there is no trackpad bar. On a
Magic Mouse or Magic Trackpad, tap anywhere on the surface.
Select an item or menu command.
Double-clickPress the mouse or trackpad button down twice in rapid
succession. Tap twice on the surface of a Magic Mouse or Magic
Trackpad.
Select and open an item. Also used in word processors to select
an entire word.
Triple-clickPress the mouse or trackpad button down three times in rapid
succession. Tap three times on the surface of a Magic Mouse or
Magic Trackpad.
Used in many word processors to select an entire
paragraph.
Click and dragPoint to an item, hold down the mouse or trackpad button, and
move the mouse or drag your finger across the trackpad, and then
release the mouse or trackpad button.
To move an item from one location to another or draw a line in
a graphics application. To select multiple items, click and drag
around them; selected items are highlighted.
Control-click (right-click, if your mouse has two or more
buttons)
Hold down the Control key, press the mouse or trackpad button,
and release. With a Magic Mouse or Magic Trackpad, hold down the
Control key and tap the surface.
Point to an item and view a shortcut menu of commands for
manipulating that item.
ScrollRoll the wheel or ball near the front and middle of the mouse.
On a Magic Mouse, move one finger up and down or left and right on
the surface. On a trackpad, move two fingers up and down or left
and right on the surface.
To scroll a window up/down or right/left.