FastHandle - IT Operations Examples

FastHandle is fast operation tools for infrastructure configurations and tests.

User Tools

Site Tools


os:linux:user:index.html



Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
os:linux:user:index.html [2018/02/04 23:22]
kurihara ↷ Page moved from os:user:index.html to os:linux:user:index.html
os:linux:user:index.html [2018/07/11 00:41]
kurihara
Line 1: Line 1:
 [[:index.html#OS Management|Top#OS Management]] [[:index.html#OS Management|Top#OS Management]]
-====== User Management (user.py)=====+====== Linux User Management with Fabric (user.py)=====
  
 $FHHOME/fabfile/user.py $FHHOME/fabfile/user.py
Line 7: Line 7:
 \\ \\
  
-===== Operation =====+===== Operation with Fabric =====
 ==== print list of possible commands ==== ==== print list of possible commands ====
  
Line 39: Line 39:
  
  
-==== Ref. Remote Shell Commands ====+==== Fabric one-line Task Examples====
 <sxh bash toolbar:false gutter:false> <sxh bash toolbar:false gutter:false>
 $ H=test-server-1 $ H=test-server-1
Line 102: Line 102:
 def check_group(group): def check_group(group):
     """user.check_group:group01"""     """user.check_group:group01"""
-    res = run("grep %s /etc/group" % group, warn_only=True)+    res = run("grep ^%s /etc/group" % group, warn_only=True)
     if res.failed is True:     if res.failed is True:
         puts(red("There isn't %s in %s." % (group, env.host_string)))         puts(red("There isn't %s in %s." % (group, env.host_string)))


os/linux/user/index.html.txt · Last modified: 2019/02/11 00:39 by kurihara