General :: Set GECOS Field For Existing User?

Sep 27, 2010

I would like to know the command to change or add GECOS field of existing user. when i tried to find the command i end up getting this which is only valid for new user account.

Code:

useradd --help
-c, --comment COMMENT set the GECOS field for the new user account
My system details.

Code:

# lsb_release -a
LSB Version: :core-3.1-ia32:core-3.1-noarch:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: OracleVMserver
Description: Oracle VM server release 2.2.0
Release: 2.2.0
Codename: n/a

View 1 Replies


ADVERTISEMENT

General :: Field-terminating Char Appears Within Field Values?

May 18, 2010

I've had a very colorful morning learning the innerparts of Linux's sort command, and have come across yet another issue that I can't seem to find an answer for in the documentation. I'm currently using -t, to indicate that my fields are split by the comma character, but I'm finding that in some of my files, the comma is used (between double-quotes) within values:

Jonathan Sampson,,foo@bar.com,0987654321
"Foobar CEO,","CEO,",ceo@foobar.com,,

How can I use a comma to terminate my fields, but ignore the occurences of it within values? Is this fairly simple, or do I need to re-export all of my data using a more-foreign field-terminator? (Unfortunately, I do not have any control over declaring a different terminator with this particular project).

View 2 Replies View Related

Server :: Add Existing Unix User To Existing LDAP?

Jun 23, 2010

I have an existing unix user that some how didnt make it into the copy over to our LDAP server. How do I add an existing unix user to an existing LDAP directory? Will ldapadd work? I was under the impression ldapadd required an ldif file to work properly.

View 7 Replies View Related

General :: Recreate A User With/without Impacting Existing Filesystem/permissions/shell?

Jun 1, 2010

I am trying to run a cron job as an oracle user. I put the user in the cron.allow file but it still won't run. Other users are able to run a cron job though. I think it's the way the oracle user was created and I wanted to recreate it. However it owns a lot of other file systems as well as the database. Is there a way to recreate or reset the oracle account without impacting what is currently in place?

View 1 Replies View Related

OpenSUSE Install :: Recreate A User Profile / Home Dir For An Existing User A/c?

Feb 16, 2010

what is the correct way/procedure to re-create a user home directory. For instance, on a Mac/Windows machine, i would just rename the existing user profile [home dir], and then just log back in as the user - job done. On OpenSuse/Linux, it seems it does not work that way..?! When i try to rename my home folder to say me.old via root, and log back in as me, i get all kinds of errors. Opensuse does create a new home dir, but it appears not properly.

View 9 Replies View Related

Programming :: Awk - Print A Field When Field Position Is Unknown ?

Mar 28, 2010

I'm trying to display fields from flat files where the first 8 fields are always the same. Fields 9 - n are varied but will contain specific patterns I'm after. I'm using this so far because "mySearch" is on each line I want to examine.

Code:

How would you pattern match and include 2 additional fields above field $9 but change field position from line to line?

View 12 Replies View Related

Ubuntu :: Show Password Entry Field For Default User In FIRST Login Screen?

Jun 11, 2010

When I boot Ubuntu 10.04 then at first the login screen appears with the main user

"Peter"
and
"other..."

In 99% of the cases I use "Peter" and have explicitely to click on Peter. Only then the password entry field appears and I can enter it.

This is somehow user unfriendly. Can I define somehow a default user (here: Peter) and show immediately the password entry field (and place the cursor inside)?

View 2 Replies View Related

Programming :: Awk Printing From Nth Field To Last Field

Jan 8, 2010

How can print the, let's say 5nd field to the last field of every record (let's say we have 10 fields)?

I mean: I cant avoid to have to do:

print '{$5 $6 $7 $8 $9 $10}'

View 2 Replies View Related

Programming :: Php - Get A Return From A Field Within A Field?

Apr 27, 2009

I am creating a game with random variables. In the game I have created a dialogue exchange to players. I have set up a table with various returns and I inserted {$fields} to represent various random variables. When I call on the requested fields, I only see the field text and my field names. Am I supposed to parse something and call it back another way?

ie: myfield is: "You have won {$random1} silver! <br />{$wi['gender'] majesty rewards you well." the code I am using to call that field is:

View 11 Replies View Related

General :: Why Does "ls -a" Hide Some Existing Directory From The Root User

Sep 2, 2010

Today I found something really interesting (at least to me) on one of our test servers:

I can change into an existing directory from my actual working directory using a relative path, but that very same directory is not listed when using ls -a.

Here is the shell session (as root):

$ pwd
/you/are/here
$ ls -a
. .. <-- Note: "somedir" is not shown to root
$ echo $CDPATH

[Code]....

I had checked the automount thing mentioned by Gilles, but as I had changed to somewhere and issued a mount|grep somewhere there were no output.

Here is the lsattr and strace output as suggested: [URL]

View 8 Replies View Related

Ubuntu :: Make An Existing User Admin?

Sep 2, 2010

how would i make an existing user on kubuntu 8.10 an administrator with root access?

View 3 Replies View Related

Ubuntu :: 11.04 Unity Invisible For Existing User-account?

May 3, 2011

After updating to ubuntu 11.04 I have a problem with one of my existing user-accounts. When l log into the "ubuntu"-session I can not see the top panel and the launcher. But when I click, e.g. left where I would expect the launcher, an application e.g. LibreOffice is started. So unity is there but invisible. Other and new user accounts do not have this problem. Does anybody know how to fix this? - I already tried "unity --reset" but nothing changed.

View 1 Replies View Related

Debian :: Rename An Existing User And His Home Directory?

Sep 29, 2009

How is the best way to rename an existing user and his home directory under Debian Lenny? BTW I'd like to have the same settings like Desktop Icons, Bookmarks etc.

View 5 Replies View Related

CentOS 5 :: Initial KDE Desktop Settings On An Existing User?

Aug 30, 2009

Does anyone know how to install the Default KDE Desktop settings in an existing user? I copied a user's home directory from another Linux and when I added the user using adduser on the new intallation, it did not copy any of the Desktop or other .rc/.profile settings.

Is there a script that is run by adduser, or a list somewhere of the files that are needed for KDE Desktop to work correctly? Or, do I delete or rename certain files and then, what executable do I run to get the Desktop?

View 3 Replies View Related

Programming :: Get A Field Value Corresponding To Another Field Value?

Dec 14, 2010

i have a file : file.dat with following data

Code:

STORAGE PERCENTAGE FLAG:

/storage_01 64% 0
/storage_02 17% 1
/storage_03 10% 0
/storage_04 50% 1

I need to get the value of PERCENTAGE in a variable for a value of storage passed as variable i have tried the following without success like :

Code:

percentage='awk -vx="$defaultStorage" '{FS=OFS=" "}$1==x{print $2}1' file.dat

View 2 Replies View Related

Ubuntu Installation :: Will The 11.04 Automatic Upgrade Change Existing User Settings

May 27, 2011

However, the option to upgrade to 11.04 has recently become available in the Update Manager.

If I choose to follow this upgrade path, will my existing user settings such as nautilus shortcuts, wallpaper and other personalised settings be changed or reverted to default in any way?

Or will the upgrade execute, and leave everything looking and working exactly the same?

View 1 Replies View Related

General :: Keep Last 'n' Characters Of A Specified Field?

Apr 4, 2010

The input file consists of several fields. The first field is always five or more characters long. I want to keep the last five characters of the first field.

Example:
If the input file record is FEDERAL PACIFIC ELECTRIC PRODUCTS then I want to keep DERAL I can do this in four steps by using C, REV, C, and REV again but that seems like doing an easy thing the hard way. Is there a straightforward way to achieve this result with C or some other command?

View 14 Replies View Related

General :: Is Field BusID Necessary In XF86Config?

Mar 1, 2011

I am using a cluster of machines running on Ubuntu 10.04 LTS which are supposed to be homogeneous, but apparently they are not. In particular, I am configuring the X server on these machines.The problem is that the BusID of the graphic card is PCI:5:0:0 for some machines, and PCI:3:0:0 for others. Is there a way that the X server automatically detects the appropriate Device (based on the name for instance)?

View 1 Replies View Related

General :: Add Second Field Of Two Files On Different Servers?

Sep 1, 2010

I have one file placed at one server whose sample as follows:

57272 28
56767 0
57575 4

[code]...

View 13 Replies View Related

General :: Merge 2 Files With AWK By The Field Value

Jun 1, 2010

i have 2 file and want to merge them in the first one. the first file is like this:

2 word1
1 word2
6 word3
2 word4
......

the second:

word1 :file1 :file2
word2 :file6
word3 :file1 :file2 :file2 :..up to file6
word4 :file7 :file1
.......

So i want to ADD all those File fiels Wich have different FN for every record.

View 8 Replies View Related

General :: Replicate A Specific Field?

Apr 24, 2010

I have a file containing text. I want to replicate a specific field.For example, I might want to append a copy of the second word of each line to the end of that line.Have: Once upon a midnight dreary, while I pondered weak and weary,Over many a quaint and curious volume of forgotten lore, Want: Once upon a midnight dreary, while I pondered weak and weary, upon Over many a quaint and curious volume of forgotten lore, many Is there a Linux command which will do this? I seek a basic command, not awk, not Perl, because I haven't learned those things yet.

View 14 Replies View Related

General :: Send Mail If All Values In Second Field Are Zero?

Sep 1, 2010

In my file there are 2 fields separated by space.Sample content of file are as follows:56060 154242 053030 0Now i want to check second field of the file and if all values in second field are 0(zero) and send mail containing all contents of the file

View 3 Replies View Related

General :: Bash Script Is Reprinting Part Of A Field From An Awk Statement?

Apr 21, 2010

Here's the bash script:

Code:

FILES="/usr/sbin/accept
/usr/sbin/pwck
/usr/sbin/chroot
/usr/bin/fakefile

[code]....

Notice the extra" file size" lines in there? What's causing that? I'm trying to learn more bash skills. I have no experience with awk because I have been unable to understand it's basic necessity. But I thought maybe if I try it with some test scripts I might become more interested in using it more and expand my very limited capabilities.

View 13 Replies View Related

General :: Search A File To Find If Variable Belongs To A Field?

May 18, 2011

I have a file that contains 5 fields and anothen one with two I want to take the value from user and search file1 and if the value exists then write in file2 to the $2 to the line that $1=value

file 1
1:fsdfsd:g:33:fsdf
2:yytgdcf:a:3:sgd
3:tttt:g:67:yujhggfg

[code].....

View 2 Replies View Related

General :: Removing Specific Field Seperator To Combine Two Fields?

Dec 2, 2010

I am trying to remove the space between the 2nd and 3rd fields but just cannot work out how to do it. I've considered sed, cut, awk...I know with sed you can replace all instances within a file but can you also specify to remove, say, the 2nd instance of a space in each line (this would be perfect for me)?

DAAE 60 402 Bejaia Algeria 1 36-43N 005-04E 36-43N 005-04E 2 2 P
DAAG 60 390 Dar-El-Beida Algeria 1 36-43N 003-15E 36-43N 003-15E 25 25 P
DAAJ 60 670 Djanet Algeria 1 24-33N 009-28E 24-33N 009-28E 1054 1054 P

[code]...

View 3 Replies View Related

General :: Select Lines From FileA Based On A Key Field In FileB

Feb 11, 2011

I want to select lines from FileA based on a key field in FileB.

egrep does this nicely:
"egrep -w '0132874|0132880|0100765' < " FileA

Suppose FileB consists of three lines:

0132874
0132880
0100765

Is there a way to code egrep to do the selection? I really like code which does not use explicit loops so my interest is to find a grep or egrep or sed (or some other) command to perform this function.

Neither file is sorted on the key field but they could be. There is no requirement to keep the files in their present order.We may assume that each key value in each file is unique.

View 2 Replies View Related

General :: Make My Field In Networking - Cisco Certifications Or Red Hat Certifications?

Jan 11, 2011

hi, i am about to complete my BCA this year...and i want to make my field in networking...so i want to know that whether y should do Cisco Certifications or Red Hat Certifications....please tell me...

View 2 Replies View Related

General :: Why 'cannot Overwrite Existing File'

Mar 8, 2011

I try to write to a file "date > file" but Linux says 'cannot overwrite existing file'. I tried chmod 755 but still cannot write to the file. What should I do?

View 2 Replies View Related

General :: Possible To Resume Existing Vim Process?

Sep 13, 2011

When I left work yesterday I left vim open with the files I was working on. I'm working from home today, so I VPN'ed in and when I go to edit those same files, I get the warning that there's another current vim session open with those files. I know I could just force logout my other user, but that would kill the existing vim session. I think my changes would all be saved in the .swp file. Instead, is it possible for me to take that existing vim session and open it with my second login? That way it would for sure preserve all my changes, and I wouldn't have to open all the same tabs again.

View 5 Replies View Related

General :: Cannot Overwrite The Existing Files

Apr 15, 2011

I run a command in a Linux terminal, the result was written to the desied folder. After I modified the command and rerun it. The old files are still there and not overwritten at all. Only it is successfull after I deleted the old files and run the command.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved