General :: Add A User Using The Useradd Command?

Feb 10, 2010

I am trying to learn shell scripting from a book and all I am doing is following few instruction from the book. Now this is what I am doing. I am trying to add a user using the useradd command so I run the following at command prompt root@S8500C_9>useradd ajit. The first time when I add this user I was successful.Later I deleted this suer using the userdel -r ajit command.Now when again I am trying to add this user it gives me following error. useradd: group ajit exists - if you want to add this user to that group, use -g. Now when I try using the -g option with the useradd command it gives we all the set off options avaiable to use along with the useradd command but doesnt create the ajit use

View 5 Replies


ADVERTISEMENT

Server :: Add A User With Useradd Command?

Mar 26, 2011

I want to add a user with useradd command, however I get this error:

Code:
mahmood@node1:home$ sudo useradd user2
useradd: cannot lock /etc/passwd; try again later.

View 3 Replies View Related

Debian Configuration :: Can't Login With New User (useradd Command)

Sep 5, 2015

I created a new user with command useradd (as root) :

Code: Select alluseradd razer123

And then set a password with command passwd (as root):

Code: Select allpasswd razer123
No Error!

When I logged out and tried to login with new user, I coulden't! (even after restart!)

I looked into /etc/passwd :

Code: Select allcat /etc/passwd | grep razer123

result:

Code: Select allrazer123:x:1002:1002::/home/razer123:/bin/bash

There is no home folder in the path!

# I have debian 8 and MATE desktop.

View 5 Replies View Related

Ubuntu :: Create One User Without Password Using Useradd Command?

Jul 1, 2010

I want to create one user without password using useradd command. Is there any way we can do the same? I have googled it but couldn't get the perfect solution

View 1 Replies View Related

General :: Use Useradd Command Against LDAP?

Dec 12, 2010

How can I add user on LDAP to my Linux server ?

View 1 Replies View Related

General :: USERADD Command NOT Found?

May 25, 2010

when i see /usr/bin there is no useradd command. and i want to add a user.if i type the command it is shooting an error saying command nt found .how should i create a user.

View 3 Replies View Related

General :: Add A New User With Useradd On Debian 4.0: Segmentation Fault

Jun 30, 2010

I would like to add a new user with useradd (on Debian 4.0), I get the message Segmentation fault. I made a strace, that says: access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory) I have read maybe the libc6 is missing or damaged, so I installed it again (apt-get install libc6, install was successfull), but the problem is still there. I touched it (touch /etc/ld.so.nohwcap)

View 7 Replies View Related

General :: Return Code 1 For Useradd Command?

May 2, 2011

getting a error return code for useradd commandthe return code is 1cite or tell me the explanation of return code 1 .

View 1 Replies View Related

General :: Creating Account With Useradd Command

Mar 9, 2011

I encountered a question in the Redhat Skills Assessment regarding useradd: Which of the following cannot be defined when you create a user account with useradd?
a* A password expiration date.
b* The user's primary group.
c* The user's default shell.
d* The user's NIS or LDAP group.
e* The user's home directory.
Which is the correct answer? I have my own thinking which will be explained later.

View 2 Replies View Related

General :: Useradd Creates User But Fails To Make Home Directory

Oct 7, 2010

when I try to add a user it fails to make the corresponding home directory. I can still su to the user, set the password, and everything else. the output is as follows:

$ useradd username
useradd: cannot create home directory /home/username

I read that this could be a result of there not being enough space but if I do df -h, i see that only 88% of the memory is being used.

View 14 Replies View Related

General :: Unable To Neither Add New Users Using Command Useradd Nor Delete Existing Users Using Command Userdel

Jun 30, 2010

Im not getting able to neither add new users using command useradd nor delete existing users using command userdel. And even Im not getting able to login into any existing users except root. It was ok before. Im having this problem very recently on my linux server. Im using RHEL5.

View 9 Replies View Related

General :: Useradd Command To Create Passwd / Shadow & Other Files Under Different Directory

May 19, 2011

I am bulding my own image based on 2.6.32 kernel, I wish to add a guest user:

In a script thats invoked by the makefile, I use 'useradd' command & this updates the shadow, passwd files under /etc on the host, is it possible to tell the command to create the shadow / password under some other folder on the host? may be /tmp?

View 2 Replies View Related

Software :: Cannot Create New User (useradd: Unknown Group MyGroup)

Jun 7, 2010

I try to add a new user but got error (shown in title). Is it possible to create a new user and create a new group at the same time? Or should I create the new group first then the new user?

View 1 Replies View Related

CentOS 5 :: Useradd Command - Finding 10 Last Files Sorted

Apr 6, 2009

I work under centos 5, I would like to know which command to use in order to find where the useradd command is geinstalled. Second How can I find the 10 last files sorted (reverse) from the /etc directory.

View 2 Replies View Related

General :: Use This Command It Will Ask The User To Enter Year In Command?

Apr 4, 2011

i want in the website they ask to enter some input.Code:echo -e "<p>Please Enter Year : c</p> "read Yearif i use this command it will ask the user to enter year in command. but what i want is they ask the user to enter year in web browser.

View 14 Replies View Related

General :: Run A Command Under Root As Another User?

Jan 8, 2010

So, i've a little question. I have a Linux Red Hat 5.1 System wich has a programm that needs to be started as a user -> usera .When i reboot the server, how can i make it possible to run a command in the shell as usera user?Someone told me, that this is not possible to make an autostart entry because this works only with the root account?!What i want its simple.- Command -> startprg need's to be started as user usera automatically after an automated reboot of the red hat linux

View 4 Replies View Related

General :: Command To Log Off User Who Froze Screen

May 6, 2011

I was looking for a command to log off the user who froze the screen. I logged in as a new user but I got some errors now all I see is the color screen, how can I log the new user off (the GUI)? I did the above command but nothing came in return?

View 8 Replies View Related

General :: Run One Command As Different User Without A Password Prompt?

Aug 4, 2010

I need to run one command as different user with out a password prompt.

I did this

Code:
one localhost= (two) /usr/bin/whoami

This work but it prompts for password. Is there a way that can be done with NOPASSWD option ?

View 1 Replies View Related

General :: Check The User Command History In Unix?

Aug 19, 2010

I know the 'history' command give me a list of the commands I have typed into the Unix terminal.

How do I see the command history for all of the users currently logged onto the system?

View 1 Replies View Related

General :: Automate Sudo Su - User Command From A Script?

Feb 9, 2011

i want to automate sudo su - user command from a script...it will then ask for a password...how do i automate this?

View 3 Replies View Related

General :: Send Command To Another User's Screen Terminal

Mar 22, 2011

I have two users; user1 and user2. I have a bash script run by user1, that needs to run a command on a screen terminal started by user2.

View 1 Replies View Related

General :: Administration - View Command History Of Another User

Jul 11, 2011

Can anybody show me how to view command history of another user? I am an admin on my machine. I can see normal history by viewing /home/user_name/.bash_history but i can't see commands of that "user_name" when they were doing sudo. Is there a way to view all command executed by one user?

View 3 Replies View Related

General :: Execute A Command On X-session Owned By Another User?

Jul 13, 2011

Is possible (by root of course) to run a command from console, that will be executed on X-session owned by another user on the same linux box/machine ? Example: Can root open xclock for another local user logged into X11 ?

View 2 Replies View Related

General :: Creating User With Password In Single Command?

Jan 16, 2010

I'm trying to create a user john with default password 'abcdef'. I used the following command.

useradd john -p abcdef

I can't login with the password. in /etc/shadow file I can see the password in clear text format. how I can create a user along with password.

View 3 Replies View Related

General :: Change Password Of An User Using Usermod Command?

Jul 20, 2010

I am trying to change the password of a user by 'usermod' command. let us assume that there is a user named "test" to change the password of the user we can type "passwd test" which will change the password of the user "test". I want to change the password similarly using the command "usermod". when I give usermod -p yahoo test"(yahoo is the password which I want to set), I am not getting any errors but when I switch user to test, I am unable to login.

View 1 Replies View Related

General :: Run A (service) Command As A Normal User During Start Up?

Oct 12, 2009

I have found so many ways for root user to execute commands in so many possible path locations - but having difficulties on executing commands as normal user - during start up.This is what i've got for /etc/rc.d/rc.local script:Code:su -l user && (/bin/sh svc_cmd.sh &)But the command doesn't run at all...

View 2 Replies View Related

Ubuntu :: Command To Determine Active User (Not $USER Variable)

Jul 21, 2010

I'm trying to write a small script that will run as root, but launch a command with sudo as another user. I want that user to be whichever user is active user. That is, the user that is using GDM right now, or the one that is logged into the current console. (by current console, I don't mean the user running the script, but rather the user logged into the console currently displayed on the screen.)How can this be done?

Code:

ACTIVE_USER=`somecommand`
test `id -u pulse` -ge 1000 && sudo -u $ACTIVE_USER $*

What can I use for "somecommand"?

View 5 Replies View Related

General :: Rsync Command Inserting User Home Directory?

Apr 7, 2011

Why would rsync insert a user's home directory path in variable expansion when run via cron, but not when run manually. The gory details... Red Hat Enterprise Linux AS release 4 (Nahant Update 6) Linux 2.6.9-67.0.20.ELsmp The script (parts anyway, and simplified)...

Quote:

#!/bin/bash
. /home/bea/.bash_profile
echo rsyncloc=${rsyncloc} >> ${log}

[code]....

View 4 Replies View Related

General :: Batch User Creating With 'newusers' Command Question

Jul 26, 2011

I recently used the newusers command to generate several user accounts from a text file. That process seemed to go well until I tried to su into one of the new accounts.

This behavior appears for all the accounts that were created from the text file and the newusers command. It seems that several configuration files that should have been autogenerated for these new users were never created. I was able to confirm this was the problem by copying .bashrc and .bash_profile from a user that was created with the "useradd" command into the /home/newaccount directory. After logging off and logging into the newaccount again, the issue is corrected.For the record, I just read this forum post and I'm looking for an alternative to this. If this is the most efficient way to accomplish my goal, then I'll try the route mentioned in the thread. I'm still open to alternatives.

View 1 Replies View Related

General :: How Important Is 'CLUE' / Command Line User Environment?

Oct 16, 2010

I have read many articles by eminent Linux users who laugh off, when they are asked "is a command line knowledge necessary"?. They go on to say that Linux Distros have evolved so much that the GUI is sufficient! I use my Win.desktop for 1)checking the news, 2)checking my e-mail, 3)writing a blog, 4)Listening to music, and 5)since i am a consultant physician, with specialization in diabetology,keeping up with the trends by visiting a few professional websites! So, my needs are few!Which Distribution would you suggest to a completely Linux-ignorant person,and that's me!

View 14 Replies View Related







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