mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
Updated from Samba-2.2.7 code tree.
(This used to be commit 3163213081
)
This commit is contained in:
parent
aa3e8c598e
commit
8191e7aa15
@ -6,13 +6,15 @@ unalias *
|
|||||||
set path = ($path /usr/local/samba/bin)
|
set path = ($path /usr/local/samba/bin)
|
||||||
|
|
||||||
set smbpasswd = /usr/local/samba/private/smbpasswd
|
set smbpasswd = /usr/local/samba/private/smbpasswd
|
||||||
|
#set smbpasswd = /etc/samba/smbpasswd
|
||||||
set user_map = /usr/local/samba/lib/users.map
|
set user_map = /usr/local/samba/lib/users.map
|
||||||
|
#set user_map = /etc/samba/smbusers
|
||||||
#
|
#
|
||||||
# Set to site specific passwd command
|
# Set to site specific passwd command
|
||||||
#
|
#
|
||||||
#set passwd = "cat /etc/passwd"
|
set passwd = "cat /etc/passwd"
|
||||||
#set passwd = "niscat passwd.org_dir"
|
#set passwd = "niscat passwd.org_dir"
|
||||||
set passwd = "ypcat passwd"
|
#set passwd = "ypcat passwd"
|
||||||
|
|
||||||
set line = "----------------------------------------------------------"
|
set line = "----------------------------------------------------------"
|
||||||
if ($#argv == 0) then
|
if ($#argv == 0) then
|
||||||
@ -53,9 +55,7 @@ foreach one ($argv)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
echo "Adding: $unix to $smbpasswd"
|
echo "Adding: $unix to $smbpasswd"
|
||||||
eval $passwd | \
|
/usr/bin/smbpasswd -a -n $unix
|
||||||
awk -F: '$1==USR { \
|
|
||||||
printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd
|
|
||||||
if ($unix != $ntid) then
|
if ($unix != $ntid) then
|
||||||
echo "Adding: {$unix = $ntid} to $user_map"
|
echo "Adding: {$unix = $ntid} to $user_map"
|
||||||
echo "$unix = $ntid" >> $user_map
|
echo "$unix = $ntid" >> $user_map
|
||||||
|
Loading…
Reference in New Issue
Block a user