Hello everybody,
I am trying to set the homeDirectory and loginShel of my users in the
samba user database from the command line interface (no webgui stuff)
See the attachment for the smb.conf
The samba users are in a ldapsam:editposix openldap database. They
show with getent passwd and getent group or ldapsearch -x.
# both do not work
usermod --shell /bin/bash username
usermod --home /home/samba/username/ username
# both show no option to set homeDirectory or loginShell
pdbedit -u username
net rpc user ?
Can somebody help me with the correct command line commands to set the
homeDirectory and loginShell for my samba user database?
Thanks in advance,
With kind regards,
Jelle de Jong
#-----------------------------------------------------------------------
# cat /etc/samba/smb.conf
[global]
workgroup = WORKGROUP
server string = samba %v server
interfaces = lo, eth1
bind interfaces only = Yes
passdb backend = ldapsam
log file = /var/log/samba/log.%m
max log size = 1000
load printers = No
wins support = Yes
ldap admin dn = cn=admin,dc=powercraft,dc=nl
ldap delete dn = Yes
ldap group suffix = ou=groups
ldap idmap suffix = ou=idmap
ldap machine suffix = ou=computers
ldap passwd sync = yes
ldap suffix = dc=powercraft,dc=nl
ldap ssl = no
ldap user suffix = ou=users
panic action = /usr/share/samba/panic-action %d
idmap backend = ldap:ldap://localhost/
idmap alloc backend = ldap
idmap uid = 5000-50000
idmap gid = 5000-50000
idmap alloc config:ldap_user_dn = cn=admin,dc=powercraft,dc=nl
idmap alloc config:ldap_base_dn = ou=idmap,dc=powercraft,dc=nl
idmap alloc config:ldap_url = ldap://localhost/
ldapsam:editposix = yes
ldapsam:trusted = yes
[algemeen]
comment = Algemene Directories
path = /home/samba/shares/algemeen
valid users = "+Algemene Users"
force group = "Algemene Users"
read only = No
create mask = 0770
force create mode = 060
directory mask = 0770
force directory mode = 070
store dos attributes = Yes
vfs objects = recycle
...
#-----------------------------------------------------------------------
# ldapsearch -x -b 'uid=user01,ou=users,dc=powercraft,dc=nl'
# extended LDIF
#
# LDAPv3
# base <uid=user01,ou=users,dc=powercraft,dc=nl> with scope subtree
# filter: (objectclass=*)
# requesting: ALL
#
# user01, users, powercraft.nl
dn: uid=user01,ou=users,dc=powercraft,dc=nl
uid: user01
sambaSID: S-1-5-21-3666446341-808242571-133736059-1039
objectClass: sambaSamAccount
objectClass: account
objectClass: posixAccount
cn: user01
uidNumber: 5009
gidNumber: 5000
homeDirectory: /home/CASSIDY/user01
loginShell: /bin/false
sambaPasswordHistory: 00000000000000000000000000000000000000000000000000000000
00000000
sambaPwdLastSet: 1272203716
sambaAcctFlags: [U ]
# search result
search: 2
result: 0 Success
# numResponses: 2
# numEntries: 1
#-----------------------------------------------------------------------
# usermod --shell /bin/bash user01
usermod: user01 not found in /etc/passwd
# usermod --home /home/samba/shares/ user01
usermod: user01 not found in /etc/passwd
#-----------------------------------------------------------------------
# getent passwd | grep user01
user01:*:5009:5000:user01:/home/CASSIDY/user01:/bin/false
#-----------------------------------------------------------------------
--
To unsubscribe from this list go to the following URL and read the
instructions: https://lists.samba.org/mailman/options/samba