The Samba-Bugzilla – Attachment 7395 Details for
Bug 8635
Samba 4 denies Linux/Samba single sign on
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Samba4 user add - msilveira version
s4user (text/plain), 1.40 KB, created by
Mauricio Silveira
on 2012-03-15 18:38:42 UTC
(
hide
)
Description:
Samba4 user add - msilveira version
Filename:
MIME Type:
Creator:
Mauricio Silveira
Created:
2012-03-15 18:38:42 UTC
Size:
1.40 KB
patch
obsolete
>#!/bin/sh >UIDMODE="rid" >S4USER="$1" >S4GROUP="$2" >S4PASS="" >S4SPREFIX="/usr/sbin" >S4BPREFIX="/usr/bin" >S4HOST="localhost" >S4DNDOMAIN="DC=SOGO,DC=LOCAL" >S4LDAPURI="ldap://mailxchange.sogo.local" >S4SHELL="/bin/sh" >S4HOME="/home/${S4USER}" > >echo "Creating s4 posix user ${S4USER}" >echo "Pls enter pwd for ${S4USER}" >${S4SPREFIX}/samba-tool user add "${S4USER}" >sleep 2 > >if [ "x$UIDMODE" == "xrid" ]; then > S4UID=$( ${S4BPREFIX}/wbinfo -n "${S4USER}" | sed -e 's,.*-\([[:digit:]]\+\).*,\1,g' ) >else > S4UID=$( ${S4BPREFIX}/wbinfo -i "${S4USER}" | cut -d ":" -f 3 ) >fi > >#add the posix attributes to the user >echo "dn: CN=${S4USER},CN=Users,${S4DNDOMAIN} >changetype: modify >add: objectclass >objectclass: PosixAccount >- >add: uidNumber >uidNumber: ${S4UID} >- >add:unixHomeDirectory >unixHomeDirectory: ${S4HOME} >- >add: loginShell >loginShell: $S4SHELL" | \ >ldapmodify -H ${S4LDAPURI} > >if [ "x$S4GROUP" != "x" ]; then > S4GRID=$( ${S4BPREFIX}/wbinfo -n "${S4GROUP}" | sed -e 's,.*-\([[:digit:]]\+\).*,\1,g' ) > > echo ${S4SPREFIX}/samba-tool group addmembers "${S4GROUP}" "${S4USER}" > ${S4SPREFIX}/samba-tool group addmembers "${S4GROUP}" "${S4USER}" > sleep 1 > #set the user to the posix group > echo "dn: CN=${S4USER},CN=Users,${S4DNDOMAIN} > changetype: modify > replace: primaryGroupID > primaryGroupID: ${S4GRID}" | \ > ldapmodify -H ${S4LDAPURI} > sleep 2 >fi >mkdir ${S4HOME} >chown -R "${S4USER}": "${S4HOME}" > >echo "New user: ${S4USER} POSIX-ified"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 8635
:
7329
|
7330
|
7394
| 7395 |
7396
|
7407