General :: Shell Script For Printing User From /etc/passwd?

Oct 15, 2010

How we can take username from the /etc/passwd which have UID more than or equal to 500.

View 3 Replies


ADVERTISEMENT

General :: Delete /etc/passwd And Recover It With /etc/passwd - From Runlevel 1 The Lastly Created User Is Not Having His Account After Recovery?

Jan 14, 2011

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 Related

Fedora :: Create A Shell Script That Adds User And Password In The Passwd And Smbpasswd?

Feb 18, 2010

is it possible to create a shell script that adds user and password in the passwd and smbpasswd?

View 3 Replies View Related

General :: Switch User- No Passwd?

Dec 20, 2010

All servers mentioned below run OpenSuSE, either 10 or 11.I am currently working on a few scripts that are meant to be used as part of a continuous integration setup. I am trying to keep these scripts reasonably secure, and so I have made sure that all the servers run these scripts only as a specific user (user1) that has permissions to basically nothing else. The problem I am currently running into is that I need to start and stop tomcat as user1 but this user doesn't have permissions to the tomcat rectory (only tomcat has execute permissions). I have a temporary workaround in place while I work on the scripts (I have an SSH key in place that allows me to SSH from user1o tomcat without a password and execute my commands that way) but it is not very secure. I have tried adding the following line to /etc/sudoers:

Code:
tomcat localhost = NOPASSWD: /opt/tomcat/bin/startup.sh, /opt/tomcat/bin/shutdown.sh
but it doesn't work as I expected it to. I tried a few different syntaxes for that line,

[code]...

View 6 Replies View Related

General :: SFTP With User Nectand Passwd Set On The Header Of Connection

Mar 25, 2011

How I can do a ftp connection putting the user and passwd, and I would do! Today, I need to know how can I do this, but in SFTP!

View 1 Replies View Related

General :: Find Command When Loggin As A Normal User And Search For A File Passwd Under?

Dec 25, 2010

when loggin as a normal user and search for a file passwd under /etc. i get few errors with permission denied.how to ignore this permission denied errors.

csh hostname 109 % find . -name passwd
find: ./lvm/backup: Permission denied
find: ./lvm/archive: Permission denied

[code]....

View 4 Replies View Related

General :: $HOME/.bashrc Disabled When User Shell Is 'rbash' (restricted Shell)?

Jun 15, 2011

MACHINE: HP Proliant DL260G5OS: SLES 11 SP1kernel: Linux xserver 2.6.32.12-0.7-default #1 SMP 2010-05-20 11:14:20 +0200 x86_64 x86_64 x86_64 GNU/LinuxIt is used as remote xserver in a LAN.I have configured /usr/lib/restricted/bin/.rbashrc with some environment variables but when the users logon in the system finally is executed $HOME/.bashrc and some environment vars are overwritten.

View 2 Replies View Related

General :: Write A Shell Script That Allows Only User 1 And User 2 To Execute A Program?

Feb 25, 2010

I've looked everywhere but I can't find where to change the default box for incoming mail, or am I on the wrong track. It's a nuisance having to change folders and I can't configure wastebin to empty on exit.And I can't get kmail to import from evolution. Do I have to go to the evolution storage and do it manually, and if so, how do I do that?

View 1 Replies View Related

General :: Login As Other User Using Shell Doesn't Load The Profile For That User?

Dec 11, 2009

I am using the sudo command to log on locally as another user by the following command:

sudo -u theotheruser -s
or
sudo -u theotheruser sh

As I see it, this initiates a new shell with the mentioned other user.However, this doesn't load that users profile from his home directory.Is there a way to automatically read the users profile when login in with selected command? I am mostely interested in getting a working prompt when logged in.

View 11 Replies View Related

Security :: User Appear In /etc/shadow And Not /etc/passwd

Jul 28, 2010

In what cases would a user appear in /etc/shadow and not /etc/passwd

View 2 Replies View Related

Security :: SSH User/passwd Or PPK Secure Key?

Apr 22, 2010

we are trying to make a policy decision whether to go with SSH user/passwd or PPK secure key ? our servers are hosted remotely by a hosting service. we were wondering which of these two models are more secure.e.g. i would tend to think that user/passwd with account lockouts upon failed attempts would be more secure because the other option exposes your server in case someone sneaks the PPK file or steals your whole computer.however, what makes me doubt myself is that Amazon Web Services EC2 cloud hosting uses PPK by default (although an instance's SSH config can be change to accommodate logging in but they don't endorse it).

View 3 Replies View Related

Red Hat / Fedora :: Server Creates User Account In /etc/passwd?

May 16, 2011

I 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 Related

Security :: Loging In Ssh With User Nmot Present In /etc/passwd

Jan 26, 2011

Is it possible to log in secure shell (openssh ) using a username and password which is not present in "/etc/passwd" .The shell created after authentication should be owned by the logged in user . Is it possible to store the user infromation like uid , gid , home dir , shell in some remote machine instead of /etc/passwd and then retrive the these these information when a session is created for the logged in user .

View 2 Replies View Related

Security :: Requiring PPK Secure Key - Disabling User/passwd Login

Apr 23, 2010

I am using Red Hat and was wondering how to disable username and password only login and require that a PPK secure key file be used for authentication ? I can log in using the secure private key and the public key that is in ~/.ssh/authorized_keys but i can still log in using the plain username and password login.

View 2 Replies View Related

Server :: Use Htpasswd To Add Password To User And Store In /etc/vsftpd/passwd

Feb 4, 2010

I started to work on building a ftp by vsftpd in our lab (that's only for our lab members). I am going to setup some the virtual users for each of the member. We have a CentOS5 (without upgrade after the fresh installation). I try several ways to setup the vsftpd for virtual users. 1) with db4 2) with mysql 3) without database and use htpasswd. But all fails. Actually, I don't want to use database, so I am going to find out the reason of failure on 'htpasswd' method

My vsftpd is installed in /etc/vsftpd (for only using ftp account, it is no problem to login).

1) I setup an account called vftpuser and build the corresponding home (/home/vftpuser), and then I setup another account call usera and also create a directory within /home/vftpuser.

2) I use htpasswd to add passwd to usera and store the passwd in /etc/vsftpd/passwd.

3) I added the name of usera to /etc/vsftpd/user_list

4) I create a directory /etc/vsftpd/user to store a unique conf for each user (for usera, the conf named usera) which contains the local root for users, which is

[Code]....

View 1 Replies View Related

General :: Printing From Bash Shell / Concatenate Files Into One File With File Names Included?

May 11, 2011

I am supposed to take some small files, and print them to a specific printer, such that the small files are concatenated into one file. The file name has to be included in the file that gets printed.

Should I be looking to concatenate the files into one file with the file names included, and then print them?

something like: -printfunction -printername < file*

View 7 Replies View Related

Software :: Check A String With Actual User Passwd (ie Password In /etc/shadow)?

Sep 24, 2009

I 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 Related

Server :: Unable To Login To A User Account Even After Clearing The Password From Root Using Passwd -d

Aug 10, 2010

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]....

View 3 Replies View Related

OpenSUSE :: Updated To 11.4 [64 Bit] - Rkhunter Is Giving Warning: User 'rtkit' Has Been Added To The Passwd File

Mar 13, 2011

i have just updated to openSuSE 11.4 [64 bit]; rkhunter is giving these Warnings :

Warning: User 'rtkit' has been added to the passwd file.
Warning: User 'pulse' has been added to the passwd file.
Warning: User 'statd' has been added to the passwd file.
Warning: Changes found in the group file for group 'audio': User 'pulse' has been added to the group
Warning: Group 'rtkit' has been added to the group file.
Warning: Group 'pulse' has been added to the group file.
Warning: Group 'pulse-access' has been added to the group file.
Warning: Suspicious file types found in /dev: /dev/shm/initrd_exports.sh: ASCII text
Warning: Hidden directory found: /dev/.sysconfig
Warning: Hidden directory found: /dev/.mount

Do these look Normal, Are these False-Positives??

View 4 Replies View Related

General :: How To Add User So That They Have No Shell Access?

Feb 18, 2010

Im want to know the command to add a user with no shell access so they cannot log onto the system, but there a user on there so for example they can be part of the email server.

View 2 Replies View Related

General :: How To Run Program As User With No Shell

May 27, 2010

I have a program I want to run as it's own user. But I don't want anyone to be able to login as that user, so I created a user like: -

useradd -s /sbin/nologin someuser

How do I run a specific program owned by this user as this user? I can't su to this user as it doesn't have a shell.

View 15 Replies View Related

General :: Send Message To Other User In Shell?

Jun 22, 2009

how can i send message to other user in shelli try use write before but it say permission deny from user

View 2 Replies View Related

General :: Unabel To Switch User Shell?

Mar 17, 2011

I have a big problem here.I have 2 shell windows, ne is a root shell and the other with some user account.If I change the root password in the root shell window aspasswd rootI can change it, but when I go into the user shell window, and I do "su" I cannot switch to root. Always "incorrect password".Same happen if I try to do "su <some-other-user>"This happen ONLY in shell windowws. If I try, for example, to run some administration service, like system-config-service, the root password is accepted in the prompting window.

View 6 Replies View Related

General :: Existence Of USER Environment Variable In The Shell?

Jan 28, 2010

I heard (although I can't find any sources for proof) that the USER environment variable may not be set in a old Unix shells (maybe even some obscure shells as well). What is the probability that it won't be set?

View 2 Replies View Related

General :: How To Look At History File In Unix Shell For User?

May 28, 2010

How to Look at history file in unix shell for a user, find 5 most often used commands.

View 5 Replies View Related

General :: A Script For Deleting User , If He Has No Login Shell?

Nov 25, 2010

I want to create a script to delete user if he has no login shell.

View 4 Replies View Related

General :: Set Environment Variables For A Particular User On C Shell Configurations?

Jun 2, 2011

I have been give a task of replicating one of our production systems to create a test system. I have been restricted to use c shell to set up its environment variables. I am new to this my questions is how do i set environment variables for a particular user on c shell e.g ORACLE_HOME and ORACLE_SID permanently for a particualar user i know in bash you edit the .bash_profile file. What do i do for c shell?

View 2 Replies View Related

General :: User Defined Input In Shell Script

Dec 2, 2010

I want ssh a remote server through shell script with predefines username and passwd. i dont know how to use expect command to do that.

View 4 Replies View Related

General :: Shell Script To Automatically Login Through Ssh And Create User?

Oct 20, 2010

I was trying to create a shell script which will automatically login to the server 192.168.1.7 and checks if a user exists there or not, if it doesn't exist then it should create the user.I have very little idea about shell scriptThis is what I tried:Quote:

#!/bin/bash
pass="sacharje"
ssh 192.168.1.7

Now, how to pass that password automatically to the ssh when it asks for the password? (I can't use public key authentication here)

View 10 Replies View Related

General :: Sudo For Www User To Run Root Shell Script Via Browser?

Sep 7, 2010

I need sudo for www (apache) user to run a shell script('ip.sh' contains iptables rules) from cgi-bin directory via browser using a per script. I edit sudoers( www ALL=(ALL) NOPASSWD: ALL ),but when run the bellow command that's with err:

# sudo -u www sh /srv/www/cgi-bin/ip.sh

iptables v1.4.4: can't initialize iptables table `filter': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded. And:

# ls -al ip.sh
-rwxr-xr-x 1 root root 243 Sep 7 14:18 ip.sh

I edit sudoers so

'www ALL=(ALL) NOPASSWD: /srv/www/cgi-bin/ip.sh,/usr/sbin/iptables' too. but it doesn't work too. how can I execute this script via browser ?

View 14 Replies View Related







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