12-05-2005
man 1 chflags
I believe that 'schg' is what you may be looking for. Use carefully.
9 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi
How can I prevent anyone from logging in as root directly? I have added the line
console=/dev/null
to the file /etc/default/login
I was still able to login as root from the console. Please advice.
Thanks
Srini (4 Replies)
Discussion started by: skotapal
4 Replies
2. AIX
At the office, we often have to edit one file with VI. We are 4-6 workers doing it and sometimes can be done at the same time.
We have found a problem and want to prevent it with a file lock. Is it possible and how ?
problem :
Worker-a starts edit VI session on File-A at 1PM
Worker-b... (14 Replies)
Discussion started by: Browser_ice
14 Replies
3. UNIX for Advanced & Expert Users
We have a shared development box, running Solaris 10 that is an NIS client, all the developers have local root password. If they know the NIS uid of another user, they can just do
% useradd -u <uid> login
And then log in as that user and have full access to his files in his home directory. ... (3 Replies)
Discussion started by: nfw
3 Replies
4. Solaris
I would like to know how to prevent users connecting to a server using SSH as root.
I would still like them to be able to login with their username and then change to su.
But I would like to prevent them logging in directly as root.
I have searched the forum and read that I should set... (3 Replies)
Discussion started by: Sepia
3 Replies
5. UNIX for Dummies Questions & Answers
Hi All,
Ref: "build crontab from a text file" in same forum. (I am not allowed to post URL's in the first post)
We are reorganizing our UNIX Crontab file by first making changes in a word pad text file. The intent is to then copy it back to Crontab. Will this work? Copy and Paste does not... (6 Replies)
Discussion started by: nivedhitha
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
when 2 users are logged as root , how can i find witch one had perform witch command?
Thanks, (1 Reply)
Discussion started by: prpkrk
1 Replies
7. Shell Programming and Scripting
So I have a script that runs as a non-root user, lets say the username is 'xymon' .
This script needs to log on to a remote system as a non-root user also and call up a bash script that runs another bash script as root.
in short: user xymon on system A needs to run a file as root user and have... (2 Replies)
Discussion started by: damang111
2 Replies
8. Shell Programming and Scripting
I have a script which do validation check and perform code migration from one env. to another, this is built for users/developers.
How can I prevent this shell script from copy or read from users, as they can modify it and run it as per their requirement where as this has to be standard script and... (1 Reply)
Discussion started by: pramendra
1 Replies
9. Shell Programming and Scripting
I need to list users in /etc/passwd with root's GID or UID or /root as home directory
If we have these entries in /etc/passwd
root:x:0:0:root:/root:/bin/bash
rootgooduser1:x:100:100::/home/gooduser1:/bin/bash
baduser1:x:0:300::/home/baduser1:/bin/bash... (6 Replies)
Discussion started by: anil510
6 Replies
LEARN ABOUT NETBSD
flags_to_string
STAT_FLAGS(3) BSD Library Functions Manual STAT_FLAGS(3)
NAME
string_to_flags, flags_to_string -- Stat flags parsing and printing functions
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <util.h>
char *
flags_to_string(u_long flags, const char *def);
int
string_to_flags(char **stringp, u_long *setp, u_long clrp);
DESCRIPTION
The flags_to_string() and string_to_flags() functions are used by programs such as ls(1), mtree(8), makefs(8), etc., to parse and/or print
the st_flags field in the stat(2) structure.
They recognize the following flags:
String Flag Description
arch SF_ARCHIVED file is archived
nodump UF_NODUMP do not dump file
opaque UF_OPAQUE directory is opaque in union filesystems
sappnd SF_APPEND writes to the file may only append
schg SF_IMMUTABLE file cannot be changed; it is immutable
snap SF_SNAPSHOT file is a snapshot inode
uappnd UF_APPEND writes to the file may only append
uchg UF_IMMUTABLE file cannot be changed; it is immutable
The SF_APPEND and SF_IMMUTABLE flags are for the superuser only, whereas UF_APPEND and UF_IMMUTABLE are for the user only.
The flags_to_string() function converts the bits set in the flags argument to a comma-separated string and returns it. If no flags are set,
then the def string is returned. The returned string is allocated via malloc(3) and it is the responsibility of the caller to free(3) it.
The string_to_flags() function takes a stringp of space, comma, or tab separated flag names and places their bit value on the setp argument.
If the flag name is prefixed by: ``no'', then the bit value is placed on the clrp argument.
RETURN VALUES
flags_to_string() returns the symbolic representation of flags, the default string, or NULL if allocation failed.
string_to_flags() returns 0 on success and 1 if it fails to parse the string, setting stringp to point to the first string that it failed to
parse.
SEE ALSO
chflags(2), stat(2)
BSD
August 6, 2011 BSD