User Tools

Site Tools


mywiki:linux:linuxadmin

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
mywiki:linux:linuxadmin [2015/03/02 10:03] shaoguohmywiki:linux:linuxadmin [2019/09/15 18:55] (current) – external edit 127.0.0.1
Line 1: Line 1:
 Linux Admin  Linux Admin 
-| Reference | [[http://www.er.uqam.ca/nobel/r10735/unixcomm.html|Useful Linux Commands]] |+| Reference | [[http://www.er.uqam.ca/nobel/r10735/unixcomm.html|Useful Linux Commands]] | [[SSH]] |
  
 ====== Schedule routine with crone ====== ====== Schedule routine with crone ======
Line 18: Line 18:
     * – every month     * – every month
     * – Every day of the week     * – Every day of the week
 +
 +====== User groups management ======
 +| Set user to a primary group list only | usermod -G groups username  |
 +| Add user to other groups based on current groups | usermod -aG additional_groups username |
 +| Display user's groups | groups username |
  
 ====== how to know current shell ====== ====== how to know current shell ======
-    echo $0 - will print the program name... which in the case of shell is the actual shell +  * echo $0 - will print the program name... which in the case of shell is the actual shell 
-    ps -ef | grep $$ | grep -v grep - will look for current process ID in the list of running processes. Current process being shell, it will include shell. This is not 100% reliable  +  ps -ef | grep $$ | grep -v grep - will look for current process ID in the list of running processes. Current process being shell, it will include shell. This is not 100% reliable  
-    echo $SHELL The path to the current shell is in SHELL variable for any shell. it seems not reliable ?? +  echo $SHELL The path to the current shell is in SHELL variable for any shell. it seems not reliable ??
- +
- +
-====== Add User to groups ======+
  
-For example, add user jerry to groups ftp, www_data: 
  
-useradd -G ftp,www_data jerry 
  
 ====== Shorthand at the Command Prompt ====== ====== Shorthand at the Command Prompt ======
mywiki/linux/linuxadmin.1425261837.txt.gz · Last modified: (external edit)