zoukankan      html  css  js  c++  java
  • Linux用户和组

    用户

    有效用户

    实际用户

    有效用户ID

    实际用户ID

    1 -- 用户操作函数
    linux-rwdx:~ # useradd --help
    Usage: useradd ...
    useradd - create a new user
    
      -c comment     Set the GECOS field for the new account
     --show-defaults Print default values
     --save-defaults Save modified default values
      -D binddn      Use dn "binddn" to bind to the LDAP directory
      -d homedir     Home directory for the new user
      -e expire      Date on which the new account will be disabled
      -f inactive    Days after a password expires until account is disabled
      -G group,...   List of supplementary groups
      -g gid         Name/number of the users primary group
      -k skeldir     Specify an alternative skel directory
      -m             Create home directory for the new user
      -o             Allow duplicate (non-unique) UID
      -P path        Search passwd, shadow and group file in "path"
      -p password    Encrypted password as returned by crypt(3)
      -u uid         Force the new userid to be the given number
      -r, --system   Create a system account
      -s shell       Name of the user's login shell
     --service srv   Add account to nameservice 'srv'
          --help     Give this help list
          --usage    Give a short usage message
      -v, --version  Print program version
    Valid services for --service are: files, ldap
    
    添加一个用户:
    linux-rwdx:/home # useradd svn -d /home/svn -g svn
    linux-rwdx:/home # passwd svn
    Changing password for svn.
    New Password: 
    Reenter New Password: 
    Password changed.
    
    mkdir /home/svn
    chown -R svn:svn /home/svn
    
    2 -- 用户组操作函数
    linux-rwdx:~ # groupadd  --help
    Usage: groupadd [-D binddn] [-g gid [-o]] [-r] [-P path] [-p password] group
    groupadd - create a new group
    
      -D binddn      Use dn "binddn" to bind to the LDAP directory
      -g gid         Force the new groupid to be the given number
      -o             Allow duplicate (non-unique) UID
      -P path        Search passwd, shadow and group file in "path"
      -p password    Encrypted password as returned by crypt(3)
      -r, --system   Create a system account
     --service srv   Add account to nameservice 'srv'
          --help     Give this help list
          --usage    Give a short usage message
      -v, --version  Print program version
    Valid services for --service are: files, ldap
    

    http://wenku.baidu.com/view/37e58269561252d380eb6e0a.html

  • 相关阅读:
    UIWebView 本地缓存
    基于x86 Android ndk应用移植指南(android ndk 生成libs/x86)
    安装android的IntelHaxm.exe时出错的问题
    使用javah生成.h文件, 出现无法访问android.app,Activity的错误的解决
    犯傻似得的开发
    关于在win8下开发c或者c++时,某些特殊情况
    android 图片加载过多崩溃
    辞职的三十八个理由
    android程序的代码混淆打包
    几条常见的数据库建表id增长sql语句
  • 原文地址:https://www.cnblogs.com/motadou/p/2522633.html
Copyright © 2011-2022 走看看