Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
J
jumpserver
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ops
jumpserver
Commits
e81c710f
Commit
e81c710f
authored
Aug 21, 2014
by
guanghongwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改添加sudo时的小bug
parent
6273edde
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
sudo.ldif
sudo.ldif
+1
-1
sudoadd.sh
sudoadd.sh
+7
-3
No files found.
sudo.ldif
View file @
e81c710f
dn: cn=guanghongwei,ou=Sudoers,dc=
yolu
,dc=com
dn: cn=guanghongwei,ou=Sudoers,dc=
dianping
,dc=com
objectClass: top
objectClass: sudoRole
cn: guanghongwei
...
...
sudoadd.sh
View file @
e81c710f
...
...
@@ -12,7 +12,7 @@ dir=$(cwd)
sudo_file
=
${
dir
}
/sudo.ldif
user_sudo_file
=
${
dir
}
/
sudouser
.ldif
user_sudo_file
=
${
dir
}
/
${
username
}
.ldif
if
[
-z
$1
]
;
then
echo
...
...
@@ -27,6 +27,10 @@ if [ $? != '0' ];then
exit
3
fi
sed
-i
"/guanghongwei/ s@dianping@
$domain
@g"
${
sudo_file
}
sed
-i
"/guanghongwei/ s@com@
$suffix
@g"
${
sudo_file
}
sed
-e
"s@guanghongwei@
$username
@g"
${
sudo_file
}
>
$user_sudo_file
ldapadd
-x
-h
${
host
}
-w
${
ldapassword
}
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-f
$user_sudo_file
\ No newline at end of file
ldapadd
-x
-h
${
host
}
-w
${
ldapassword
}
-D
"cn=admin,dc=
$domain
,dc=
$suffix
"
-f
$user_sudo_file
rm
-f
$user_sudo_file
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment