summaryrefslogtreecommitdiff
path: root/source3/smbadduser
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-01-15 18:31:46 +0000
committerGerald Carter <jerry@samba.org>2003-01-15 18:31:46 +0000
commit5fb59502585c68d03bf016d6a4470f2519f941d7 (patch)
tree73cf24d130aba86a48209c41c356e25eac7df2d4 /source3/smbadduser
parentf6f4492874e2e4195b70ee9ea1cf0a495e813913 (diff)
downloadsamba-5fb59502585c68d03bf016d6a4470f2519f941d7.tar.gz
samba-5fb59502585c68d03bf016d6a4470f2519f941d7.tar.bz2
samba-5fb59502585c68d03bf016d6a4470f2519f941d7.zip
small merges from SAMBA_3_0; mostly typos, renames, etc...
(This used to be commit 9ac196dad4893b0ceef13281a140be5d85391e6c)
Diffstat (limited to 'source3/smbadduser')
-rwxr-xr-xsource3/smbadduser10
1 files changed, 5 insertions, 5 deletions
diff --git a/source3/smbadduser b/source3/smbadduser
index e4e1b273d1..9837413aeb 100755
--- a/source3/smbadduser
+++ b/source3/smbadduser
@@ -6,13 +6,15 @@ unalias *
set path = ($path /usr/local/samba/bin)
set smbpasswd = /usr/local/samba/private/smbpasswd
+#set smbpasswd = /etc/samba/smbpasswd
set user_map = /usr/local/samba/lib/users.map
+#set user_map = /etc/samba/smbusers
#
# Set to site specific passwd command
#
-#set passwd = "cat /etc/passwd"
+set passwd = "cat /etc/passwd"
#set passwd = "niscat passwd.org_dir"
-set passwd = "ypcat passwd"
+#set passwd = "ypcat passwd"
set line = "----------------------------------------------------------"
if ($#argv == 0) then
@@ -53,9 +55,7 @@ foreach one ($argv)
endif
echo "Adding: $unix to $smbpasswd"
- eval $passwd | \
- awk -F: '$1==USR { \
- printf( "%s:%s:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:%s:%s:%s\n", $1, $3, $5, $6, $7) }' USR=$unix >> $smbpasswd
+ /usr/bin/smbpasswd -a -n $unix
if ($unix != $ntid) then
echo "Adding: {$unix = $ntid} to $user_map"
echo "$unix = $ntid" >> $user_map