1 / 13

Unit-VI Adding New Users, Storage, File System

Unit-VI Adding New Users, Storage, File System. The system consults /etc/passwd at login time to determine a user’s UID and home directory Each line in the file represents one user and contains seven fields separated by colons: • Login name • Encrypted password placeholder

mangold
Download Presentation

Unit-VI Adding New Users, Storage, File System

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Unit-VI Adding New Users, Storage, File System

  2. The system consults /etc/passwd at login time to determine a user’s UID and home directory Each line in the file represents one user and contains seven fields separated by colons: • Login name • Encrypted password placeholder • UID (user ID) number • Default GID (group ID) number • “GECOS” information: full name, office, extension, home phone • Home directory • Login shell /ETC/PASSWD FILE

  3. passwd file contains an x in the encrypted password field on Linux • The actual encrypted passwords are stored in etc/shadow on Linux - Login Name: Login names (also known as usernames) must be unique and, depending on the operating system - Encrypted password : Encryption algorithms: traditional crypt (based on DES), MD5, Blowfish, and an iterative version of MD5 - UID (user ID) number : UID identifies the user to the system. Login names are provided for the convenience of users, but software and the filesystem use UIDs internally. UIDs are usually unsigned 32-bit integers

  4. Default GID number: Like a UID, a group ID number is a 32-bit integer. GID 0 is reserved for the group called root or system. /etc/group file defines the groups, with the GID field in /etc/passwd providing a default (or “effective”) GID at login time - GECOS field : GECOS field is sometimes used to record personal information about each user. The finger command interprets comma-separated GECOS entries in the following order: • Full name (often the only field used) • Office number and building • Office telephone extension • Home phone number

  5. - Home directory:user’s home directory is default directory at login time - Login shell : The login shell is normally a command interpreter such as the Bourne shell or the C shell (/bin/sh or /bin/csh), but it can be any program. sh is the traditional default for UNIX, and bash (the GNU “Bourne again” shell) is the default for Linux

  6. shadow password file is readable only by the superuser and serves to keep encrypted passwords safe from password cracking programs IBM calls the file that stores the encrypted passwords /etc/security/passwd, whilethe rest of the world calls it /etc/shadow Like /etc/passwd, /etc/shadow contains one line for each user. Each line contains nine fields, separated by colons: /ETC/SHADOW AND /ETC/SECURITY/PASSWD FILES

  7. • Login name • Encrypted password • Date of last password change • Minimum number of days between password changes • Maximum number of days between password changes • Number of days in advance to warn users about password expiration • Linux: Days after password expiration that account is disabled • Account expiration date • A reserved field that is currently always empty

  8. /etc/group file contains the names of UNIX groups and a list of each group’s members Each line represents one group and contains four fields: • Name of a group • Encrypted password or a placeholder • GID number • List of members, separated by commas /ETC/GROUP FILES

  9. Basic steps to add user by hand • Edit the passwd and shadow files to define the user’s account using vipw command. • Add the user to the /etc/group file. • Set an initial password. • Create, chown, and chmod the user’s home directory. ADDING USERS:THE BASIC STEPS

  10. Command: $ sudo useradd user_name –g group_name ADDING USERS USING USERADD

  11. Types of linux filetypes are: ext2, ext3, ext4 Ext3 adds journaling capability to the existing ext2 code Ext3 sets aside an area of the disk for the journal. When a filesystem operation occurs, the required modifications are first written to the journal. When the update is complete, a “commit record” is written to mark the end of the entry. If a crash occurs during the update, the filesystem uses the journal log to reconstruct a perfect consistent filesystem. Journaling reduces the time needed to perform filesystem consistency checks To add journal to the existing filesystem: #tune2fs –j /dev/sda1 Linux Filesystem

  12. Mkfs- format filsystems: General syntax for creating a new filesystem is: mkfs [–T fstype] [-o options] rawdevice fsck : ckeck and repair filesystems Filesystem mounting $sudo mount /dev/sda1 /mnt/temp Mkfs,fsck

  13. Inodes are fixed length table entries that each hold information about one file #ls –i Superblock is a record that describes the characteristics of the filesystems. It contains information about the length of a disk block, the size and location of the inode tables, the disk block map and usage information, the size of the block groups Filesystems cache disk blocks to increase efficiency Sync system call flushes modified blocks to their permanent homes on disk Filesystem Terminology

More Related