|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Incorrect names for file owners on mapped samba drivesHello all,
I've got a number of drives mounted from SAMBA machine (which is running linux). My local machine is running Cygwin 1.7 on Windows 7 x64. Here's (some of) my mount output: //devt/users/johnd on /j type smbfs (binary,notexec,user) C:/cygwin/bin on /usr/bin type ntfs (binary,auto) C:/cygwin/lib on /usr/lib type ntfs (binary,auto) C:/cygwin on / type ntfs (binary,auto) J: on /cygdrive/j type smbfs (binary,posix=0,user,noumount,auto) "ls -l" on /cygdrive/j and /j returns "????????" as the name of both the owner and the group of all the files on those drives. Windows explorer correctly identifies DEVT\johnd as the owner of the files. johnd's line in /etc/passwd is: johnd:unused:1000:513:U-johnd-PC\johnd,S-1-5-21-2127453718-491543372-2845810 030-1000:/home/johnd:/bin/bash and "id" returns: uid=1000(johnd) gid=513(None) groups=0(root),544(Administrators),545(Users),1006(Debugger Users),513(None) on the SAMBA machine my UID is 208, so I figured I'd just need to change the above to: johnd:unused:208:513:U-johnd-PC\johnd,S-1-5-21-2127453718-491543372-28458100 30-208:/home/johnd:/bin/bash But, having done that and re-logged in I get the message: Your group is currently "mkpasswd". This indicates that your gid is not in /etc/group and your uid is not in /etc/passwd. and the "id" command returns: uid=400(johnd) gid=401(mkpasswd) groups=0(root),544(Administrators),545(Users),1006(Debugger Users),513(None),401(mkpasswd) I've no idea where those 400s came from. an "ls -n" on a single file returns: rwxrw-r-- 1 4294967295 4294967295 1286 Mar 11 2009 zones.h so maybe the UIDs aren't getting across at all from the SAMBA server. What do I need to do to get the usernames "in sync" with the SAMBA box? Thanks again everyone, /john -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple |
|
|
Re: Incorrect names for file owners on mapped samba drivesOn 10/30/2009 11:46 AM, John Daintree wrote:
> on the SAMBA machine my UID is 208, so I figured I'd just need to change the > above to: > > johnd:unused:208:513:U-johnd-PC\johnd,S-1-5-21-2127453718-491543372-28458100 > 30-208:/home/johnd:/bin/bash ^^^ Don't change your SID. You can change your UID if you want, since this is a Cygwin thing. But if you change your SID, Cygwin can't map your UID back to the Windows SID. So then Windows won't know who you are, and Cygwin really won't either (in Windows terms). That's why you got the message you did. Assuming SAMBA uses 208 as your user ID,you should get proper (user) ownerships displaying. The same is true for your GID, if you want that. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple |
|
|
RE: Incorrect names for file owners on mapped samba drives> -----Original Message-----
> From: Larry Hall (Cygwin) [mailto:reply-to-list-only-lh@...] > Sent: 30 October 2009 16:00 > To: cygwin@... > Subject: Re: Incorrect names for file owners on mapped samba drives > > On 10/30/2009 11:46 AM, John Daintree wrote: > > on the SAMBA machine my UID is 208, so I figured I'd just need to > change the > > above to: > > > > johnd:unused:208:513:U-johnd-PC\johnd,S-1-5-21-2127453718-491543372- > 28458100 > > 30-208:/home/johnd:/bin/bash > ^^^ > Don't change your SID. You can change your UID if you want, since this > is a > Cygwin thing. But if you change your SID, Cygwin can't map your UID > back to > the Windows SID. So then Windows won't know who you are, and Cygwin > really > won't either (in Windows terms). That's why you got the message you > did. > > Assuming SAMBA uses 208 as your user ID,you should get proper (user) > ownerships > displaying. The same is true for your GID, if you want that. Thanks Larry, That seems to get be nearer where I want to be. I'm still getting some confusing (to me at least!) results. Given that mount includes: U: on /cygdrive/u type smbfs (binary,posix=0,user,noumount,auto) i.e. u: and /cygdrive/u are the same location why is it that "ls -n u:/tmp/jd.tmp" gives: -rw-r--r-- 1 208 200 0 Oct 30 16:45 u:/tmp/jd.tmp but "ls -n /cygdrive/u/tmp/jd.tmp" gives: -rw-r--r-- 1 4294967295 4294967295 0 Oct 30 16:45 /cygdrive/u/tmp/jd.tmp In addition "ls -n u:/tmp/*" returns the same UID (MY uid) for every file in the directory even though they are owned by different users. I created a new user on my windows machine and when I log in on that account all the files in u:/tmp are reported as owned by that user. Again windows explorer lists the correct owner for each file (as DEVT\username). Thanks again, john. > -- > Larry Hall http://www.rfk.com > RFK Partners, Inc. (508) 893-9779 - RFK Office > 216 Dalton Rd. (508) 893-9889 - FAX > Holliston, MA 01746 > > _____________________________________________________________________ > > A: Yes. > > Q: Are you sure? > >> A: Because it reverses the logical flow of conversation. > >>> Q: Why is top posting annoying in email? > > -- > Problem reports: http://cygwin.com/problems.html > FAQ: http://cygwin.com/faq/ > Documentation: http://cygwin.com/docs.html > Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple |
|
|
|
|
|
Re: Incorrect names for file owners on mapped samba drivesOn Nov 2 09:21, John Daintree wrote:
> I've established that the differences in the output of -ls -l on the different drives is down to differences in acl/noacl. > > $ mount > //devt/devt on /u type smbfs (binary,notexec,noacl,posix=0,user) > U: on /cygdrive/u type smbfs (binary,posix=0,user,noumount,auto) > > ls -l on u:/tmp returns "johnd" as owner of files > ls -l on /u/tmp returns "johnd" as owner > ls -l on /cygdrive/u returns "????????" as owner > > I suspect that the difference is that /cygdrive/u does not have "noacl". That's what acl/noacl is for. See the user's guide: http://cygwin.com/1.7/cygwin-ug-net/using.html#mount-table With "acl" switched on, Cygwin uses what's returned by the file system and in case of a Samba share the user and group are special SIDs constructed from the OSes uid/gid values. If you want nice entries in ls -l output, add the users and groups to your local /etc/passwd and /etc/group files using mkpasswd and mkgroup with the new -U options: http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mkpasswd http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mkgroup For instance: $ mkpasswd -U root,corinna -S_ -L my_samba_box Unix User_root:unused:10000:99999:,S-1-22-1-0:: Unix User_corinna:unused:10500:99999:,S-1-22-1-500:: $ mkpasswd -U root,corinna -S_ -L my_samba_box >> /etc/passwd $ mkgroup -U root,corinna -S_ -L my_samba_box Unix Group_root:S-1-22-2-0:10000: Unix Group_vinschen:S-1-22-2-11125:21125: $ mkgroup -U root,corinna -S_ -L my_samba_box >> /etc/group $ cd //my_samba_box/my_share $ ls -l some_file -rw------- 1 UnixUser_corinna UnixGroup_vinschen 172 2009-09-22 16:27 some_file Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple |
|
|
RE: Incorrect names for file owners on mapped samba drives> -----Original Message-----
> From: Corinna Vinschen > Sent: 02 November 2009 12:31 > To: cygwin@... > Subject: Re: Incorrect names for file owners on mapped samba drives > > If you want nice entries in ls -l output, add the users and groups to > your local /etc/passwd and /etc/group files using mkpasswd and mkgroup > with the new -U options: > > http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mkpasswd > http://cygwin.com/1.7/cygwin-ug-net/using-utils.html#mkgroup > > For instance: > > $ mkpasswd -U root,corinna -S_ -L my_samba_box > Unix User_root:unused:10000:99999:,S-1-22-1-0:: > Unix User_corinna:unused:10500:99999:,S-1-22-1-500:: > $ mkpasswd -U root,corinna -S_ -L my_samba_box >> /etc/passwd > $ mkgroup -U root,corinna -S_ -L my_samba_box > Unix Group_root:S-1-22-2-0:10000: > Unix Group_vinschen:S-1-22-2-11125:21125: > $ mkgroup -U root,corinna -S_ -L my_samba_box >> /etc/group > $ cd //my_samba_box/my_share > $ ls -l some_file > -rw------- 1 UnixUser_corinna UnixGroup_vinschen 172 2009-09-22 16:27 > some_file > Hi Corinna, Thanks for the examples. I had read the man pages for mkpasswd and mkgroup (honest!), but I must have had my incantations a little wrong. I have most of the users and groups over now. Interestingly the "root" group still displays as "????????" in the ls output, but such files are rare and I can live with that for now. Thanks again. /john -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple |
|
|
Re: Incorrect names for file owners on mapped samba drivesOn 11/02/2009 08:58 AM, John Daintree wrote:
> Thanks for the examples. I had read the man pages for mkpasswd and mkgroup > (honest!), but I must have had my incantations a little wrong. > > I have most of the users and groups over now. Interestingly the "root" group > still displays as "????????" in the ls output, but such files are rare and I > can live with that for now. See <http://cygwin.com/1.7/cygwin-ug-net/using-filemodes.html> if you're interested in the details here. Sorry about the posix/acl mix-up. I'm still getting used to the new flags in 1.7 and haven't committed everything to memory yet, as you can see. ;-) -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 216 Dalton Rd. (508) 893-9889 - FAX Holliston, MA 01746 _____________________________________________________________________ A: Yes. > Q: Are you sure? >> A: Because it reverses the logical flow of conversation. >>> Q: Why is top posting annoying in email? -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple |
| Free embeddable forum powered by Nabble | Forum Help |