<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                企業??AI智能體構建引擎,智能編排和調試,一鍵部署,支持知識庫和私有化部署方案 廣告
                http://t.zoukankan.com/greamrod-p-12448971.html * \-g  修改用戶所屬的群組,修改用戶的初始組,即修改?/etc/passwd 文件目標用戶信息的第 4 個字段(GID); * \-G  修改用戶所屬的附加群組,修改用戶的附加組,其實就是把用戶加入其他用戶組,即修改 /etc/group 文件 **區分-g 和 -G** ~~~ # id zhangsan # uid=1007(zhangsan) gid=1008(my_dev) groups=1008(my_dev),1006(kun),1007(zhangsan) 主組 1008 附屬組 1008 1007 1006 例子: # usermod -a -G my_dev,kun,gitea,docker zhangsan # id zhangsan uid=1007(zhangsan) gid=1007(zhangsan) groups=1007(zhangsan),1005(gitea),992(docker),1006(kun),1008(my_dev) # usermod -G juner zhangsan # id zhangsan uid=1007(zhangsan) gid=1007(zhangsan) groups=1007(zhangsan),1009(juner) 綜上 usermod -G 會覆蓋所有的附屬組 ~~~ ``` usermod -g?用戶組 用戶名 強行設置某個用戶所在組 usermod -G 用戶組 用戶名 把某個用戶改為 group(s) usermod -a -G 用戶組 用戶名 把用戶添加進入某個組(s) ``` ~~~ #修改用戶的目錄 usermod -d /home/hnlinux root ~~~ # [linux用戶添加到多個組](https://www.cnblogs.com/654wangzai321/p/8021573.html) ``` usermod -G groupname username (這種會把用戶從其他組中去掉,只屬于該組) 如:usermod -G git git (git只屬于git組) usermod -a -G groupname username (把用戶添加到這個組,之前所屬組不影響) 如:usermod -a -G www git (git屬于之前git組,也屬于www組) ``` ***** 在linux中使用su切換到nginx賬號的時候出現了**This account is currently not available**的錯誤提示。 使用`grep nginx /etc/passwd`查看用戶權限 ~~~bash $ grep nginx /etc/passwd nginx:x:997:995:nginx user:/var/cache/nginx:/sbin/nologin ~~~ 這里可以看出,nginx是`/sbin/nologin`禁止登錄的。只要修改這個模式就可以了 ~~~bash $ usermod -s /bin/bash nginx # 再次查看狀態 $ grep nginx /etc/passwd nginx:x:997:995:nginx user:/var/cache/nginx:/bin/bash ~~~ 然后就可以用`su - nginx`切換了 恢復的話改為`/sbin/nologin`即可 ~~~bash $ usermod -s /sbin/nologin nginx ~~~
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看