Solved

Samba setting

Posted on 1998-09-17
10
663 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
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
 

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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

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 100 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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now