LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 12-01-2017, 08:41 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
suid in fstab, fourth field.


Hi: suid is in fstab man page. 'man 2 suid says it is type uid_t. I suppose that's an integer. The question is: what's the format for suid I should use in the fourth field in fstab? Perhaps it is the numeric user ID mentioned in the chown man page and I could even use the user name. Rather than blindly test I prefer consulting.

EDIT: from mount's man page I learn for ntfs, which is the filesystem I want to mount, the option is 'uid=value'. I want everybody can use the ntfs partition or, better, just bill (username) or root. So how many bits is value and what do they represent?

Last edited by stf92; 12-01-2017 at 08:56 AM.
 
Old 12-01-2017, 08:58 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
deleted

Last edited by GazL; 12-01-2017 at 08:59 AM. Reason: removed after op edit of initial post.
 
Old 12-01-2017, 09:03 AM   #3
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
In /etc/fstab/ you can write either suid or nosuid among file-system independent options, that's all. Only for specific file systems you can user uid= or gid=. For the details see "man mount".

EDIT. I see now that you edited your post. Of course these values are the numeric ids as found in /etc/passwd.

Last edited by Didier Spaier; 12-01-2017 at 09:10 AM.
 
Old 12-01-2017, 09:05 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,842

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
But you need only 5 minutes to check both username and numerical ids.
 
Old 12-01-2017, 09:11 AM   #5
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
It's ntfs as said under EDIT. I put uid=000,gid=000, remounted and gid and uid is root according to ls. I rebooted and the same happens.
 
Old 12-01-2017, 09:18 AM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,057

Rep: Reputation: Disabled
As I wrote in my edited previous post, the values to write are those found in /etc/passwd (third and fourth field). So yes uid=0 and gid=0 is for root.

Also, better use "stat <file name>" than ls for this purpose.

Using -printf, stat can also output only the user name or the user ID of the owner, see "man stat".

Last edited by Didier Spaier; 12-01-2017 at 09:50 AM.
 
1 members found this post helpful.
Old 12-01-2017, 05:53 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
That's more than enough. Thank you.
 
  


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
find a field from a directory search & insert that field into second file mcbobolink Programming 1 04-26-2017 05:41 PM
suid conflicts from files where sticky bit is set Vs /etc/fstab JockVSJock Linux - Newbie 5 08-20-2015 05:22 AM
root entry in /etc/fstab: first field (fs_spec) ignored catkin Linux - General 8 09-29-2013 04:36 AM
Your /ect/fstab does not contain the fsck passno field LostinCode Mandriva 3 05-07-2004 03:15 PM
SUID file drops suid bit on append? c_coder Programming 1 03-12-2004 07:59 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:42 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