?
Solved

Samba setting

Posted on 1998-09-17
10
Medium Priority
?
669 Views
Last Modified: 2012-06-27
I have a pc running Linux and Samba, then I export HDD to
NT machines. Here is output of ls in NT:

C:\> ls -l U:/home/yan/a.c
-rwxrwxrwa   1 <unavail>       <unavail>            85 Sep 16 19:28 u:/home/yan/a.c


But if I use the same command (ls.exe) for other files in NT machines, the <unavail> field will be filled by owner's name and group.

My question is how to set Samba to let it give same result
as NT.


The background for my question:
I am using NuTCracker (a simulation of UNIX?) in my NT machine, so I have ls.exe, chmod.exe and so on.
I want to use RCS for files in Samba harddisk, but RCS
gives an error when it tries to call chmod() system call.
chmod.exe also give same error message as chmod() if the
file is located on Samba harddisk:
     Error: The request for network is not supported.
But if the file is on NT harddisk (local or remote), chmod.exe
works well as well as RCS.
By invistigate the reason, I found the security attribute
of samba files is different from that of NT files.
So I think if I can change some setting in samba, then I can get same result as from NT harddisk.

Please give me some ideas.

0
Comment
Question by:yan051197
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
10 Comments
 
LVL 2

Expert Comment

by:JYoungman
ID: 1586868
I expect the file has an owner/group for which no name appears in /etc/passwd.

0
 

Author Comment

by:yan051197
ID: 1586869
Thanks for your quick response.

But that file has valid user/group in /etc/passwd.
Here is output of Linux ls:
home:/home1/public/home/yan# ls -l
total 112
drwxr-xr-x   2 pcuser   users        1024 Sep 17 15:34 RCS/
-rwxr--r--   1 pcuser   users          85 Sep 16 19:28 a.c*
-rwxr--r--   1 pcuser   users        7680 Sep 16 19:40 a.exe*
-rwxr--r--   1 pcuser   users         323 Sep 16 19:39 a.o*
-rwxr--r--   1 pcuser   users        7680 Sep 16 19:39 a.out*

But the username/group do not exist in NT system,
should I add username/group in NT?
Then how to mapping NT's user/group to UNIX?


0
 
LVL 2

Expert Comment

by:JYoungman
ID: 1586870
You're MUCH better off using CVS in that kind of environment.  You can migrate to CVS from RCS while still keeping the RCS files; I highly reccomend it.  It will actually avoid all those problems as well as allowing much faster compiles (since you get a copy of the source on a local disk if you want it).

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:yan051197
ID: 1586871
I will find CVS now and to try to use it in my environment.
But we are using NT, so I am afriad no CVS version for NT.



0
 
LVL 2

Expert Comment

by:JYoungman
ID: 1586872
Of COURSE there is a version of CVS for NT.
See http://www.cyclic.com/

0
 

Author Comment

by:yan051197
ID: 1586873
Thank you very much.
I have downloaded from that site and I will install it now.
That company olny sell CD-ROM to U.S.A. But I am in Japan.


0
 
LVL 6

Expert Comment

by:joe_massimino
ID: 1586874
I think your problem is because Samba was meant to sharing Linux with Windows users, but you are using non NT, or Windows commands from what Linux thinks is a Windows share. If you issue the same commands from NT's native system commands it should work, but in order for the Unix type commands to work from the NT box, the programmers would have to know that you were going to use them that way so they could have written them to work that way. If you were on a true Unix platform, it would work because you would not be using samba.  You can Telnet in and use whatever you like, but the interface you are trying to make happen was not meant to be.  
This is only my opinion, and as such, is subject to change in proportion to my level of knowledge at any given momement.
0
 

Author Comment

by:yan051197
ID: 1586875
Thanks for joe_massimino.
Perhaps my question was not clear.
The problem in fact also occur in native NT environment.
If we use NT Explorer for any file in another NT share,
then we can see the "Security" tab (page) from the properties menu, so you can set the ACL, etc.
But if we use NT Explorer for any file in Samba share,
we can not see the "Security" tab (page) from the properties
menu.
Samba is desgined to appear as a NT machine, so I think it should
act same as other NT shares, the key point maybe how to set some
parameters in smb.conf?

Bye the way, I decided to use CVS as recommended by JYOUNGMAN,
and I hope CVS will work happy with Samba.

Thanks again.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 1586876
beside CVS vs. RCS, back to the initial question, did you try following in  smb.conf

[your_share_name_here]
  force user  = %U
  force group = %G
0
 
LVL 2

Accepted Solution

by:
alexbik earned 200 total points
ID: 1586877
Hi,

What you are trying won't work. With samba, a share is mounted as a specific user. Which user this is (and what his/her rights will be) is determined at mount time, not afterwards. That means that all files on that share, seen from the client side, will have the same owner. There's nothing you can do about that. If you want to be able to change owners of files that are on remote filesystems, you will definitively need a different protocol, NFS for instance.

Alex.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Note: for this to work properly you need to use a Cross-Over network cable. 1. Connect both servers S1 and S2 on the second network slots respectively. Note that you can use the 1st slots but usually these would be occupied by the Service Provide…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question