·  cisco univercd

·  cit

·  3com

Managing users, files, and directories.

 

LINUX

Linux

·  Bookmarks

·  Pc Dictionary

·  tucows

·  HTMLGoodies

·  slashdot

+  useradd

·  cisco univercd

·  cit

·  3com

+  passwd

·  Resources

·  Computing history

·  Windows98 SE

+  usermod

·  Freshmeat

·  Slashdot

+  userdel

+ # find / -uid 529

+  groupadd

+  gpasswd

+  # find / -gid 503

+  umask

+  chown

+  chgrp

+  chage

+  chmod

·  Managing Users

·  Take over an account

·  Remove a directory

·  User names and passwords

·  Groups

·  Directory and file access components

·  chown File and directory ownership.

·  chgrp change group

·  chmod change permissions

·  Permissions Octal values

 

 


Managing users

Managing users in Linux. Passwords are kept in:

/etc/passwd

/etc/shadow.

Start a second X session:

$ startx -- :1 vt8

Restrictions on the root account:

(On most) root can logon from the console only.

To take over an account:

# su george

Execute a command as the root account:

$ sudo

Who may use sudo:

/etc/sudoers

It is possible to set a program to always run as if ran by the root account. No matter who runs the program:

SUID root files: a special bit (attribute) is set.

Take over an account

User names:

Usernames cannot start with a number.

Usernames may be 32 characters in length.

Usernames are case sensitive.

General rule:

Avoid using punctuation.

Remove a directory

This command WILL remove all of your system! WARNING as root account:

# rm –r /

This command will remove the olddir.

# rm –r /home/george/olddir

Usernames and passwords

·  Bookmarks

·  Pc Dictionary

·  tucows

·  HTMLGoodies

·  slashdot

useradd

·  cisco univercd

·  cit

·  3com

passwd

·  Resources

·  Computing history

·  Windows98 SE

usermod

·  Freshmeat

·  Slashdot

userdel

# find / -uid 529

Groups

grpadd

gpasswd

# find / -gid 503

Directory and file access

Directory and file Access Components

The directory permissions above:

drwx r-x r-x

 ----- ---- ----

Similar file permissions:

-rwxrw---

chown, file and directory ownership

Changing file ownership permissions

chown changes a file’s owner and optionally, its group:

                       Where               what

# chown [options] [.newgroup] filename

# chown sally.projects2 report.tex

Used with chown, hanges all the files within a directory.

--recursive

chgrp, change group

# chgrp

chmod, change permissions

Octal value for permissions

Octal value for permissions:

Set user ID (SUID)

rwsr-x--x

Set group ID (SGID)

rwxrwS--x

Indicated by an (s) in the execute section of the (u) user section of super user ID, and in the execute section of the group permissions.

Sticky bit:

When this bit is present on a directory, the directory’s files can only be deleted by their owners, the directory’s owner, or root.

The sticky bit is indicated by a (t) in the world execute bit position.

drwxr-xr-t

Win98SE

1 1