Last change
on this file was 206, checked in by Herwig Bauernfeind, 16 years ago |
Import Samba 3.3 branch at 3.0.0 level (psmedley's port)
|
File size:
719 bytes
|
Rev | Line | |
---|
[206] | 1 | #!/bin/sh
|
---|
| 2 | #
|
---|
| 3 | # Copyright (C) 1998 Benny Holmgren
|
---|
| 4 | #
|
---|
| 5 | # Script to import smbpasswd file into the smbpasswd NIS+ table. Reads
|
---|
| 6 | # from stdin the smbpasswd file.
|
---|
| 7 | #
|
---|
| 8 | while true
|
---|
| 9 | do
|
---|
| 10 | read row
|
---|
| 11 | if [ -z "$row" ]
|
---|
| 12 | then
|
---|
| 13 | break
|
---|
| 14 | fi
|
---|
| 15 |
|
---|
| 16 | if [ "`echo $row | cut -c1`" = "#" ]
|
---|
| 17 | then
|
---|
| 18 | continue
|
---|
| 19 | fi
|
---|
| 20 |
|
---|
| 21 | nistbladm -a \
|
---|
| 22 | name=\"`echo $row | cut -d: -f1`\" \
|
---|
| 23 | uid=\"`echo $row | cut -d: -f2`\" \
|
---|
| 24 | lmpwd=\"`echo $row | cut -d: -f3`\" \
|
---|
| 25 | ntpwd=\"`echo $row | cut -d: -f4`\" \
|
---|
| 26 | acb=\"`echo $row | cut -d: -f5`\" \
|
---|
| 27 | pwdlset_t=\"`echo $row | cut -d: -f6`\" \
|
---|
| 28 | gcos=\"`echo $row | cut -d: -f7`\" \
|
---|
| 29 | home=\"`echo $row | cut -d: -f8`\" \
|
---|
| 30 | shell=\"`echo $row | cut -d: -f9`\" smbpasswd.org_dir.`nisdefaults -d`
|
---|
| 31 | done
|
---|
Note:
See
TracBrowser
for help on using the repository browser.