08-24-2005
Oh ... tht's great ... so though root does not have write permission, does it mean that still he can open it in vi and overwrite it with w! .. rite ...
Does vi give this special overwrite permission for root alone ...
Because I created a file with write permission only to the owner .. and opened the file in vi as another user of same group and tried to save it with w! .. it said permission denied .. ;-( ... the same as expected .. then how come it allow the same for root alone .... does vi recognize root and grants him the privilege to overwrite ...
Really appreciate if anyone cud elaborate on this ..
Thanks in advance,
SNS
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Sirs,
What is a shadow file,How it be usefull.For my project i have to keep the password in shawdow file also i am doing in php how can i do it.
Thanks in advance,
ArunKumar (3 Replies)
Discussion started by: arunkumar_mca
3 Replies
2. UNIX for Advanced & Expert Users
what does 'x' in the encrypted password field in /etc/shaodw file represent? (3 Replies)
Discussion started by: jbashir
3 Replies
3. Solaris
my etc/shadow file showing *LK* for a particular user.. can u tell me under which circumstances a user is locked (5 Replies)
Discussion started by: vikashtulsiyan
5 Replies
4. UNIX for Advanced & Expert Users
Does anyone know what "!!" represents in the password field of the /etc/shadow file? :confused: (6 Replies)
Discussion started by: avcert1998
6 Replies
5. UNIX for Dummies Questions & Answers
I see conflicting definitions for the shadow file. For Solaris, what are the fields please? Thanks. (3 Replies)
Discussion started by: DavidS
3 Replies
6. Shell Programming and Scripting
Hey guys..
i need to be able to append 'LK' to a password field in the shadow file
I cannot use commands such as usermod chsh i need to directly be able to manupilate the files through a menu driven interface. So in other words write to the shadow file
How could i do this?
so far... (1 Reply)
Discussion started by: musicmancanora
1 Replies
7. Shell Programming and Scripting
Hi,
In shadow file
smithj:Ep6mckrOLChF.:10063:0:99999:7:::
3rd Field 10063 indicates the number of days (since January 1, 1970) since the password was last changed.
I want to get the result with script the date on which the password was last changed in YYYY-MM-DD format.
can... (8 Replies)
Discussion started by: pinnacle
8 Replies
8. Solaris
hi everybody i 'm beginner in solaris and by mistake i removed shadow file any one can help me to restore it from passwd file (4 Replies)
Discussion started by: maxim42
4 Replies
9. UNIX for Advanced & Expert Users
Hi,
What are the default file permissions for /etc/shadow file in Linux. and What is meant by open files in linux.Any body please help me.Thanks in advance. (2 Replies)
Discussion started by: Sharath Kumar
2 Replies
10. UNIX for Dummies Questions & Answers
As a part of linux hardening
In shadow file all Application accounts which are not locked must contain only an asterisk “*” in the Passwd field.
But how would i do it by using command?
Is there any way other than modifying shadow file to accomplish this task? (3 Replies)
Discussion started by: pinga123
3 Replies
stat.h(3HEAD) Headers stat.h(3HEAD)
NAME
stat.h, stat - data returned by stat system call
SYNOPSIS
#include <sys/types.h>
#include <sys/stat.h>
DESCRIPTION
The system calls stat, lstat and fstat return data in a stat structure, which is defined in <stat.h>.
The constants used in the st_mode field are also defined in this file:
#define S_IFMT /* type of file */
#define S_IAMB /* access mode bits */
#define S_IFIFO /* fifo */
#define S_IFCHR /* character special */
#define S_IFDIR /* directory */
#define S_IFNAM /* XENIX special named file */
#define S_INSEM /* XENIX semaphore subtype of
IFNAM */
#define S_INSHD /* XENIX shared data subtype of
IFNAM */
#define S_IFBLK /* block special */
#define S_IFREG /* regular */
#define S_IFLNK /* symbolic link */
#define S_IFSOCK /* socket */
#define S_IFDOOR /* door */
#define S_ISUID /* set user id on execution */
#define S_ISGID /* set group id on execution */
#define S_ISVTX /* save swapped text even after
use */
#define S_IREAD /* read permission, owner */
#define S_IWRITE /* write permission, owner */
#define S_IEXEC /* execute/search permission,
owner */
#define S_ENFMT /* record locking enforcement
flag */
#define S_IRWXU /* read, write, execute: owner */
#define S_IRUSR /* read permission: owner */
#define S_IWUSR /* write permission: owner */
#define S_IXUSR /* execute permission: owner */
#define S_IRWXG /* read, write, execute: group */
#define S_IRGRP /* read permission: group */
#define S_IWGRP /* write permission: group */
#define S_IXGRP /* execute permission: group */
#define S_IRWXO /* read, write, execute: other */
#define S_IROTH /* read permission: other */
#define S_IWOTH /* write permission: other */
#define S_IXOTH /* execute permission: other */
The following macros are for POSIX conformance (see standards(5)):
#define S_ISBLK(mode) block special file
#define S_ISCHR(mode) character special file
#define S_ISDIR(mode) directory file
#define S_ISFIFO(mode) pipe or fifo file
#define S_ISREG(mode) regular file
#define S_ISSOCK(mode) socket file
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO
stat(2), types.h(3HEAD), attributes(5), standards(5)
SunOS 5.10 30 Aug 2002 stat.h(3HEAD)