[Samba] migrating accounts and passwords

Andrew Mark andrewm at aimsystems.ca
Thu Jan 22 07:54:31 MST 2015


Sorry, I thought I had already attached them:

old F11 smb.conf:

[global]

# ----------------------- Network Related Options -------------------------
     workgroup =  WORKGROUP
     server string = File Server

     hosts allow = 193.0.0. 127. 10.30.4.
     hosts deny = 193.0.0.199

# --------------------------- Logging Options -----------------------------
     # logs split per machine
     log file = /var/log/samba/log.%m
     # max 50KB per log file, then rotate
     max log size = 50

# ----------------------- Domain Controller Options ------------------------
     security = user
     passdb backend = tdbsam

     domain master = yes
     domain logons = yes

     # the login script name depends on the unix user used
     logon script = %u.bat
     logon path =

# ----------------------- Browser Control Options 
----------------------------
     local master = yes
     os level = 65
     preferred master = yes

#----------------------------- Name Resolution 
-------------------------------
     dns proxy =no

# --------------------------- Printing Options -----------------------------
     load printers = yes
     cups options = raw

#============================ Share Definitions 
==============================

[homes]
     comment = Home Directories
     browseable = no
     writable = yes

[printers]
     comment = All Printers
     path = /var/spool/samba
     browseable = no
     guest ok = no
     writable = no
     printable = yes

# Un-comment the following and create the netlogon directory for Domain 
Logons
[netlogon]
     comment = Network Logon Service
     path = /etc/samba/netlogon
     guest ok = yes
     writable = no
     share modes = no


# Un-comment the following to provide a specific roving profile share
# the default is to use the user's home directory
[Profiles]
     path = /home/profiles
     browseable = yes
     read only = No
     guest ok = yes


# A publicly accessible directory, but read only, except for people in
# the "staff" group
[public]
     comment = Public Shared Director
     path = /home/public
     public = yes
     writable = yes
     printable = no
     only guest = yes

[Archive]
    comment = Archive Directory
    path = /extra/archive
    public = yes
    only guest = no
    writable = yes


As I said previously, my users used to have UIDs starting in the 500 
range.  I've bumped up the all the current users' UIDs starting in the 
1000 range. (Yes, I have obsolete users on the old server still in the 
500 range.  They won't be defined on the new server)

Frustratingly, a pdbedit listing [ pdbedit -L ] will list my users with 
the correctly bumped UIDs.
But an export [ pdbedit -e smbpasswd:/tempFile ] preserves the old UIDs

It's a bit of a pain to recreate 25-30 Samba accounts and their 
passwords but what if I had to support 200+ users?!
It's the principle.

Any help would be super.

Cheers,
  

Andrew Mark | Development Analyst | www.aimsystems.ca
local: 519-837-1072 | fax: 519-837-4063 | int'l 800-465-2961
12-350 Speedvale Ave. W. | Guelph, ON | N1H 7M7 | Canada

On 2015-01-19 02:13 PM, Rowland Penny wrote:
> On 19/01/15 17:31, Andrew Mark wrote:
>> Hi all,
>>
>> I'm trying to migrate my users to new hardware.
>> They're currently using Samba version 3.4.7-0.50 on Fedora 11
>> I have a new F20 server set up with Samba version 4.1.14
>> As you know, F11 had user accounts starting at uid 500 whereas F20 
>> has accounts starting at uid 1000
>> I've already done usermod -u <NewUID> and groupmod -g <newGID> for 
>> the Linux accounts to bump them up.
>>
>> How do I migrate Samba accounts and preserve UID/GID and passwords?
>>
>> When I look inside the file created by: pdbedit -e 
>> smbpasswd:/root/migrate/smbpasswd.old, I see the old UIDs ?!
>> How do I migrate Samba accounts while making the jump seamless for my 
>> users?
>> i.e. preserve UID/GID and most importantly, passwords.
>>
>
> Hi, can you post your smb.conf
>
> Rowland



More information about the samba mailing list