Username: egg
Full name:egg
Uid (Leave empty for default ):
Login group [egg]:
Login group is egg. Invite egg into other
groups? [ ]:
Login class [default]:
Shell (sh csh tcsh nologin) [sh]: csh
Home directory [/home/egg]:
Home directory permissions (Leave empty for
default):
Use password-based authentication? [yes]:
Use an empty password? (yes/no) [no]:
Use a random password? (yes/no) [no]:
Enter password:
Enter password again:
Lock out the accout after creation? [no]:
Username
: egg
Password
: *****
..
/
Home
Group
egg@:/var % cd/
egg@:/ % ls
COPYRIGHT
bin
boot
dev
entropy
etc
home
lib
libexec
media
mnt
proc
rescue
root
sbin
sys
tmp
usr
var
entropy
etc
home
lib
libexec
media
mnt
proc
rescue
root
sbin
sys
tmp
usr
var
egg@:/ % ls -a
.
..
.cshrc
.profile
.snap
.sujournal
COPYRIGHT
bin
boot
dev
Change file owner
指令:chown
用法: chown (O) [: G] (filename)
root@:/tmp # chown egg about
root@:/tmp # ls -l
total 4
-rwxr--r--
1 egg
wheel
9 Oct 21 13:55 about
root@:/tmp # chown egg:egg about
root@:/tmp # ls -l
total 4
-rwxr--r--
1 egg
egg
9 Oct 21 13:55 about
51.
Change file mode
指令:chmod
用法: chmod _ _ _ (filename)
___
Owner group other
r → 4 rwx: 4+2+1
=7
w → 2 rw : =6
x → 1 r : =4
52.
Change file mode
指令:chmod
用法: chmod _ _ _ (filename)
root@:/tmp # chmod 747 about
root@:/tmp # ls -l
total 4
-rwxr--rwx
1 root
wheel
9 Oct 21 13:55 about