LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2015, 06:53 AM   #16
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11

[root@printmah samba]# ls -l
total 4
drwxrwxr-x+ 2 root linux 6 Feb 20 05:13 demo
 
Old 04-01-2015, 12:12 PM   #17
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
change in smb.conf file change
Code:
winbind enum users = yes    
winbind enum groups = yes
winbind nested groups = yes
restart samba,winbind

Post the output of
wbinfo -u and wbinfo -g
and what's in the log file

Last edited by zafar_dandoti; 04-01-2015 at 10:37 PM.
 
Old 04-01-2015, 11:10 PM   #18
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Just to try i created a folder test
and assigned permission as
Code:
rwxrwxr-x  zafar domain users test
And add to share in smb.conf file
Code:
valid users = zafar@EXAMPLE.COM,domain users
Restarted samba and winbind and tried connecting
Code:
smbclient //localhost/test -U zafar@EXAMPLE.COM
Prompted to enter password and i was able to connect to share
 
Old 04-04-2015, 12:46 AM   #19
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by zafar_dandoti View Post
change in smb.conf file change
Code:
winbind enum users = yes    
winbind enum groups = yes
winbind nested groups = yes
restart samba,winbind

Post the output of
wbinfo -u and wbinfo -g
and what's in the log file
I did it and the command show me the all groups in AD, For example :

grpillustration_economy
grpillustration_economy_delete
grpillustration_diplomatic
grpillustration_diplomatic_delete
grpillustration_economy_read
grpillustration_diplomatic_read
grpillustration_diplomatic_write
grpillustration_economy_write
grplayout_economy
grppagination_economy_delete
grplayout_diplomatic
grppagination_diplomatic_delete
grppagination_economy_read
grppagination_diplomatic_read
grppagination_economy_write
grppagination_diplomatic_write
grpphoto_economy
 
Old 04-04-2015, 12:51 AM   #20
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by zafar_dandoti View Post
Just to try i created a folder test
and assigned permission as
Code:
rwxrwxr-x  zafar domain users test
And add to share in smb.conf file
Code:
valid users = zafar@EXAMPLE.COM,domain users
Restarted samba and winbind and tried connecting
Code:
smbclient //localhost/test -U zafar@EXAMPLE.COM
Prompted to enter password and i was able to connect to share
I have a question:

Did you use "chgrp YOURDOMAIN\\domain_users PATCH/" or just use "chgrp domain_users PATCH/" ?
I guess "domain_users" is correct and not "domain users".
 
Old 04-04-2015, 07:10 AM   #21
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
No just
Code:
# chown zafar /test
user zafar is present on both linux and AD with different passwords

#chgrp "domain users" /test
#chmod 775 /test
 
Old 04-04-2015, 10:34 AM   #22
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Oh
The username must exist on two platforms? If I have 200 users in AD I must create all 200 users in Linux too!!!!!!!!!
 
Old 04-04-2015, 11:00 AM   #23
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
No i dont mean that. I just told u how it was working with me.
For folder test i changed the group owner to
Code:
chgrp "domain users" /test
Then in smb.conf
Code:
[test]
       path = /test
       Valid users = "EXAMPLE.COM\domain users"
  write list = zafar@EXAMPLE.COM
restart smb
Code:
smb client //localhost/test -U zafar@EXAMPLE.COM
I INPUT DOMAIN PASSWORD WHEN PROMPTED
 
Old 04-05-2015, 12:09 AM   #24
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I did it but Got the same error :

[root@printmah samba]# ls -l
total 4
drwxrwxr-x+ 2 root domain_users 6 Feb 20 05:13 demo


[root@printmah samba]# smbclient //localhost/demo -U jason@JASONDOMAINI.JJ
Enter jason@JASONDOMAINI.JJ's password:
Domain=[JASONDOMAINI] OS=[Unix] Server=[Samba 4.1.1]
tree connect failed: NT_STATUS_ACCESS_DENIED

Firewall is inactive too :

[root@printmah samba]# service iptables status
Redirecting to /bin/systemctl status iptables.service
iptables.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)

[root@printmah samba]#


As I said, I want to read AD accounts and use them for apply permissions and all AD accounts not exist in my Linux.
 
Old 04-05-2015, 01:51 AM   #25
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
try adding jason@JASONDOMAINI.JJ to valid users in smb.conf file.
Post output for
Code:
wbinfo -u
and
Code:
wbinfo -g
Code:
getent passwd
 
Old 04-05-2015, 05:25 AM   #26
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I added my account to "smb.conf" and run below commands :

[root@printmah ~]# wbinfo -u
eghbali
shoseini
rahmani
afrasiabi
shayan
bani
niakan
jason

it show me all AD users.


[root@printmah ~]# wbinfo -g
linux
grffani-read
grffani-write
grffani-delete
grffani-karkard-read
grffani-karkard-write

It show me all AD Groups.

[root@printmah ~]# getent passwd
jason:*:11303:10513:JASON JASON:/home/jason:/bin/sh

It show me all usernames and hash info.
 
Old 04-05-2015, 07:21 AM   #27
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Did u tried conjecting user jason? What happens?

The default AD group should be
"domain users" in double inverted commas not domain_users.
One thing i remember do u have clock syncing with server?

Last edited by zafar_dandoti; 04-05-2015 at 07:38 AM.
 
Old 04-05-2015, 10:06 AM   #28
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
The default AD group should be "domain users", What does mean?

I added a new share like below :

[test]
path = /home/jason/m/
read only = no
browseable = yes

and I can open it.

[root@printmah jason]# ls -l
total 0
drwxr-xr-x. 2 jason domain_users 6 Feb 18 06:52 m
 
Old 04-05-2015, 11:12 AM   #29
zafar_dandoti
Member
 
Registered: Dec 2005
Location: India
Distribution: centos
Posts: 178

Rep: Reputation: 13
Ok tell me that the directory u r sharing does it resides on a volume which is acl enabled.
Show me output of
# getfacl /pathto/share
 
Old 04-05-2015, 11:57 PM   #30
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
OK.

[root@printmah ~]# getfacl /srv/samba/demo
getfacl: Removing leading '/' from absolute path names
# file: srv/samba/demo
# owner: root
# group: domain_users
user::rwx
user:root:rwx
group::rwx
group:linux:rwx
mask::rwx
other::r-x
default:user::rwx
default:user:root:rwx
default:group::r-x
default:group:linux:r-x
default:mask::rwx
defaultther::r-x
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Samba share can't write in linux, can in Windows xmrkite Linux - Software 1 09-17-2012 12:14 PM
creating files from windows on a samba share gives read-only permissions. lievendp Linux - General 5 12-17-2008 10:55 AM
Access linux SAMBA share from windows pengu Linux - Software 6 02-17-2007 11:55 AM
samba - accessing windows share in linux mikeotieno Linux - Software 7 07-28-2006 06:12 AM
samba: linux mounted share = choppy playback, windows mounted share = smooth kleptophobiac Linux - Software 2 04-10-2005 08:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:18 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration