Ubuntu :: Check Line For Account In /etc/passwd?
Nov 12, 2010If you don't know which shell you are using , either check the line for your account in /etc/passwd
what is that suppose to mean? how do i check it? do i check it from the terminal?
If you don't know which shell you are using , either check the line for your account in /etc/passwd
what is that suppose to mean? how do i check it? do i check it from the terminal?
we know that /etc/passwd - is a replica of /etc/passwd file and acts as a backup in any damage done to /etc/passwd file..i have observed a strange thing in RHEL 5.4....for example... if /etc/passwd has 100 accounts.. then /etc/passwd - is having only 99 accounts....when i add 101 useraccount with "useradd" then /etc/passwd has 101 accounts and /etc/passwd is having the 100th account of /etc/passwd - ..when i delete /etc/passwd and recover it with /etc/passwd - from runlevel 1 the lastly created user is not having his account after recovery.. what is the solution? this is same case even with /etc/shadow and /etc/shadow -
View 2 Replies View RelatedI have to do several scripts and I have no idea of how to do this one: Make a script that read line by line the passwd file and prints in console.Hope you understand couse my english isso bad as you can see.Our teacher told us something like this:#!/bin/bashwhile read line doecho $lineadone < dispositiveexit
View 9 Replies View RelatedI have just got my Openldap server up and running howerver, I admit I'm a little confused about authenticating a client mechine to the server. When I create an account on the ldap server, does this mean that the server creates a user account in the /etc/passwd, or somewhere else on the server?
View 2 Replies View RelatedWhen I use ls -al to show files downloaded from internet,
-rw-rw-r-- 1 427 6011 7544 Jul 20 2006 INSTALL
-rw-rw-r-- 1 427 6011 4229 Dec 9 15:36 Makefile.am
-rw-rw-r-- 1 427 6011 27893 Dec 10 17:47 Makefile.in
I can see the owner and group ids are shown because there are no corresponding entries in /etc/passwd and /etc/group respectively. I don't know much about linux and dare not to edit these files, I wonder if somebody already knows whether linux would map the owner id of files coming from other computers to the account name in /etc/passwd and display them when necessary (for example, when using ls -al)?
Not able to login to a user account, even after clearing the password from root using passwd -d
[root@ivrsdb1_pnq /]# passwd -S oracle
Password locked.
[root@ivrsdb1_pnq /]# passwd -u -f oracle
Unlocking password for user oracle.
[code]....
I want to access a file, and check the length of every line.After, i want to check and replace all lines with length over 10 characters, with a message.Does anyone have a clue on that?
View 1 Replies View RelatedI am trying to write a remote access module. Is there any function in linux where I can give string (password entered by user) and compare it with the actual user password stored in /etc/shadow. Since the password is stored encrypted in /etc/shadow I cannot parse and compare. So I want some method to compare if my user entered the correct password..Is there any function for that..
View 6 Replies View RelatedI add user in Samba by
#smbpasswd -a noktualek
New SMB password:
Retype new SMB password:
How to check, How many user i really added
I edited the passwd file to modify the default shell for root from bash to tcshnow when I try to login to root it gives me the following error:"su: /bin/tcsh : No such file or directory"
View 3 Replies View RelatedI use pidgin to chat for my yahoo account. When some one comes on-line I can know that by the sound. I want pidgin to show me the account who just comes on-line, like the feature of yahoo messenger. How can I do that?
View 1 Replies View Relatedi am working on a neat little bash script, and i want the output to be mailed to my email account. So far i have tried installing sendmail then running: mail -s Test myemail@gmail.com But that hasn't worked; and i did check my spam folder. Am i missing something or is there a better technique all together?
View 8 Replies View RelatedI want to have a choice or more preferable pass shell as command line argument when I ssh to an linux account.i.e. If John logs in to account "zzz" on server "abc", by default definition of account "zzz" n server "abc" he get csh.But Sally desires that when she logs in to account "zzz" on server "abc", she needs the login shell to be ksh,and Rick wants bash when he logs in to account "zzz" on server "abc".What is the most non-intrusive / easiest way to achieve this? Each user can set their preference on ssh command line or create a simple alias by each shell, but not sure how to do this.
View 6 Replies View RelatedAfter sifting through numerous apt-get apt-cache apt-file tutorials I still can't find a command to check if a package is installed via the terminal command/line.
I know there must be some way to do it.
Say I want to check if any package from the libavcodec*.deb family is installed how could I do this without a gui eg synaptic?
Like i'm curious what version of wine i have installed...What are my current ati drivers installed...If wine isn't 1.2 or 1.3 how do i update it from command line?really any insight into this process would help its not absolutely critical to know but i've been looking around and haven't found informationOr some references to good articles to become a command line guru would be cool as well.
View 8 Replies View RelatedI'm building a script for my place of employment. The next step in it is checking what the user input was. Determining if they added a part in there or not. The script prompts for a hostname. Hostnames are localhost.localdomain. Now, I want the script to check to see if they put localdomain and if they did, not to add the domain to the /etc/sysconfig/network, but just what they entered. So say the user inputs:
[Code]....
Is there a way to get DVD region code from command line (linux/ubuntu 9.10)? I want to script this action and store the region code (and other data about DVD) in a log.
I am looking for the info about media, not the drive.
Is there any command on linux to check if CD or DVD is 32bit or 64bit?
View 2 Replies View RelatedHow to check if a directory exists in Linux command line?
[Code]....
since I am on a Dell inspiron 1545 laptop, being able to display my battery charge is critical. After some extensive googling, I found I need a command 'acpi', which does not exist on my computer. I cannot seem to find it in the packages database; the closest thing being 'acpi-support' apt-get install also can't find it.
I tried cat /proc/acpi/battery/BAT0/state, but that only shows me if the battery is discharging or charging and doesn't give me an actual percentage.
Anyone know a simple command line to check for a specific email - by subject - on an SSL secured IMAP server?
View 2 Replies View RelatedI have been trying to configure the mailcheck in gkrellm to check and notify for new mail on my gmail account. I have activated pop of course...
These are the pop info taken from gmail:
Quote:
Server for incoming mail (IMAP) - needs SSL: imap.gmail.com
Use SSL: Yes
Port: 993
Server outgoing mail (SMTP) - needs TLS: smtp.gmail.com (use verification)
Use verifiering: Yes
Use STARTTLS: Yes(some clients call this SSL)
Port: 465 or 587
I have like 4 email addresses on one Ubuntu One account and I'd like to remove them all except my current email... I also have an old account I'd like to delete. I used the contact form but to no avail.
View 2 Replies View RelatedI have a problem with the Google search box top right corner in Konqueror, when entering search I recieve an error page "Unsupported Protocol" Google asks for ioslave or kioslave. Also when highlighting text on a page and right clicking with the mouse no search option is given. I created a new user and all works as it should for the new user. What is wrong with my user account? I have reset default values in Konqueror setup.
View 3 Replies View RelatedI have two files, file1.traj and file2.traj. Both these files contain identical data and the data are arranged in same format in them. The first line of both files is a comment.
At line 7843 of both files there is a cartesian coordinate X, Y and Z ( three digits ). And at line 15685 there is another three digits. The number of lines in between two cartesian coordinates are 7841. And there are few hundreds of thousands of lines in a file.
What I need to do is copy the X Y Z coordinate (three digits) from file1.traj at line 7843 and paste into file2.traj at the same line number as in file1.traj. The next line will be 15685 from file1.traj and replace at line 15685 at file2.traj. And I dont want other lines (data) in file2.traj get altered. This sequence shall be going on until the end of the file. Means copy and substitude the selected lines from file1.traj into file2.traj.
I tried to use paste command but I cant do for specified line alone.
Here i showed the data format in the file. I used the line number for clarity purpose.
Code:
I have an account on a remote Ubuntu machine. I started the vncserver on that box, it used display number 7. From my Windows machine, I connected to the remote box on port 5907. It connected, but said, "no password configured for vncauth". I noticed that the ~/.vnc/passwd file is empty, alongwith the log file. I typed vncpasswd to set the password again, but no use. I tried vncpasswd ~/.vnc/passwd as well, but no use.The VNC server is running.
View 1 Replies View RelatedI am trying to write a program in C which compares two files and prints the line that is equal.
Here file1.txt has
and file2.txt has
Note: file2.txt consist of only a single string where as file2.txt has multiple lines. Actually im comparing two files with md5sum values.
Here is the code but it compares only first line of files..but it should compare the whole file1..and sorry iam a beginner in C can any1 sujest some modification to this code so that..it can compare file2 with entire file1
Quote:
I want to insert a line at a particular line number using sed or awk. where line number is not fixed and is in form of variable.
I want to use variable in sed or awk command.I tried something like below, but no luck.
Is there anyway to have a different password for login and root? For example, my account is Bratu. I want a login password: ABCD and my root password: EFG
View 1 Replies View RelatedI am new to Debian but not Linux-based systems. I have been experimenting a lot with Debian Lenny/Squeeze. I am growing more comfortable each day with the Debian design. Yet there remain many unexplored areas. I am creating a migration check list. Things to check, prepare, or reconfigure when moving from one Linux-based system to Debian.
I have a good computer background and my current check list probably is fairly good. Yet I would appreciate input and opinions from experienced Debian users of things to watch in such a migration. Login defs, passwd/group files, different directory locations, keymaps, services and daemons, etc. I am not too concerned with the desktop as I plan to stick with KDE 3.5 for a while and I can basically move those settings across.