It's highly dangerous to mess around with system files (e.g. password files) NOT using the tools designed for it. You might end up not being able to access the system.
For the sheer exercise: How is the user identified - by user name (field 1), UID (field 3), or both? And, it's just about field 2, so all the other fields in file 2 will stay the same? Assuming both, why don't you copy the entire line?
Try
I have 2 files - fileA and fileB
I need to match the first field of the 2 files then output some of the fields from fileA on the same line as certain fields from fileB.
There will be instances where fileB does not have a match for first field in fileA
Thanks in advance (8 Replies)
I want to count the number of occurence of perticular word from one text file.
Please tell me "less" command is work in ksh or not. If it is not working then instead of that which command will work. :confused: (40 Replies)
Hi,
We need to configure some of the fileds in bugzilla like Platform,OS, Version etc are mandatory. Is it possible to set, if yes then how to configure.
Thanks & Regards,
Bache (0 Replies)
Hi all,
I am new to UNIX, so sorry if my question seem stupid to u.
well i want to replace the first character of first 30 lines of a file, only if the first character is h.
and
in anothe script i want to replace a particular string/character say hello/h of a file.Condition: It should... (1 Reply)
Hi Friends,
Please help me in finding the solution for this :
I have a file as below :
CuDv:
name = "hdisk0"
status = 1
chgstatus = 2
ddins = "scsidisk"
location = ""
parent = "vscsi0"
connwhere = "830000000000"
PdDvLn... (3 Replies)
Dear All,
I need a unix script that will read the 7th line and especially these fileds from a file Mo speed 16, Mt speed 15 every 15 minutes starting from 00:00 to 23:45 on daily basis and put the result in a txt file and name it MT_MO_20090225.txt, please also note that the system date format... (2 Replies)
I have following text:
NAME=ora.LISTENER.lsnr
TYPE=ora.listener.type
TARGET=ONLINE , ONLINE , ONLINE , ONLINE
STATE=ONLINE on host1, ONLINE on host2, ONLINE on host3, ONLINE on host4
NAME=ora.LISTENER_1525.lsnr
TYPE=ora.listener.type
TARGET=ONLINE ... (2 Replies)
Dear All
I have a text file which has many columns (>10,000). I want to create a new text file which will NOT include following columns: 5,15,105,200. How can I do that in shell (or awk, perl)? Thanks. (6 Replies)
How to list todays file in perticular folder
Moved thread to appropriate forum (9 Replies)
Discussion started by: pspriyanka
9 Replies
LEARN ABOUT CENTOS
sulogin
SULOGIN(8) System Administration SULOGIN(8)NAME
sulogin - Single-user login
SYNOPSIS
sulogin [options] [tty]
DESCRIPTION
sulogin is invoked by init when the system goes into single user mode.
The user is prompted:
Give root password for system maintenance
(or type Control-D for normal startup):
sulogin will be connected to the current terminal, or to the optional tty device that can be specified on the command line (typically
/dev/console).
After the user exits the single-user shell or presses control-D at the prompt, the system will continue to boot.
OPTIONS -e, --force
If the default method of obtaining the root password via getpwnam(3) from the system fails, manually examine /etc/passwd and
/etc/shadow to get the password. If they are damaged or nonexistent, sulogin will start a root shell without asking for a password.
Only use the -e option if you are sure the console is physically protected against unauthorized access.
-p, --login-shell
Specifying this option causes sulogin to start the shell process as a login shell.
-t, --timeout seconds
Specify the maximum amount of time to wait for user input. By default, sulogin will wait forever.
-h, --help
Print a help message.
-V, --version
Output version.
ENVIRONMENT VARIABLES
sulogin looks for the environment variable SUSHELL or sushell to determine what shell to start. If the environment variable is not set, it
will try to execute root's shell from /etc/passwd. If that fails it will fall back to /bin/sh.
AUTHOR
sulogin was written by Miquel van Smoorenburg for sysvinit and later ported to util-linux by Dave Reisner and Karel Zak.
AVAILABILITY
The sulogin command is part of the util-linux package and is available from Linux Kernel Archive <ftp://ftp.kernel.org/pub/linux/utils
/util-linux/>.
util-linux Jul 2012 SULOGIN(8)