Force new users change their password at their first log-in
- top command shows more details than ps command. It is like running ps permanently while allowing users to change parameters or apply filters to the output.
- sar command shows the system's activities in a period of time (e.g. "> sar 10 5" get 5 samples in a 10-second interval.).
- "user@linuxhost:> find . > list_of_files.txt" creates a list of files and save it into list_of_files.txt.
- "user@linuxhost:> find /user/local -xdev > list_of_files_in_local_folder.txt" creates a list of files in the folder /user/local and save it ist_of_files_in_local_folder.txt.
- "user@linuxhost:> grep passwd list_of_files.txt" search the location of the file passwd.
- "user@linuxhost:> ps uawx | head" shows the 10 processes using most of the CPU cycles.
- "user@linuxhost:> man -s 4 passwd" access information contained in section 4 of the command passwd.
- Create a new user (useradd), create the password for the user (passwd username) make sure the user's home directory exists and corresponds to the entry in the /etc/passwd file, verify that the user owns his or her home directory and startup files, and that they are readable (and, in the case of the home directory, executable). E.g. chown -R username /home/username; chgrp -R username /home/username.
- "user@linuxhost:> id username" to display user/group information.
- "user@linuxhost:> usermod -G admin -a username" add username to group admin.
- "root@linuxhost:> shutdown -P now" to shutdown the machine right away.
- Modify /etc/sudoers file in order to use command sudo. E.g. EDITOR="emacs" visudo; and use the usermod command at list number 10 above.
References
Erik M. Keller, Unix/Linux Survival Guide, Charles River Media, Inc. , 2006.
No comments:
Post a Comment