Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 11-18-2012, 10:22 AM   #1
LQ Newbie
Registered: Nov 2012
Posts: 2

Rep: Reputation: Disabled
newusers command - permission denied

Hi, this is my first time posting a question on the site. I'm taking a class where we're using Fedora 17.

Here's my issue:
I'm trying to add an entire group of users at once, using the newusers command. I created a text file containing the user information called users.txt which is in the root home directory. UID and GID for the file are both root. From the root home directory I type in this command:

newusers users.txt

And then I receive the following error message:

newusers: users.txt: Permission denied

The problem persists even after I use chmod to set the permissions to -rwxrwxrwx. If I specify the full path to the file (newusers /root/users.txt) it still does the same thing.

I have no idea what's going on here....if anyone has any ideas please please please let me know. Thank you!
Old 11-18-2012, 10:49 AM   #2
Registered: Nov 2011
Location: India
Distribution: RedHat, Cent OS, Fedora, Debian, Ubuntu
Posts: 106

Rep: Reputation: Disabled
Check this to create multiple user accounts.
Old 11-26-2012, 11:32 AM   #3
LQ Newbie
Registered: Nov 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks but I was already doing everything your link says. I ended up reinstalling and then it worked; my project deadline was near.
Old 11-26-2012, 12:16 PM   #4
Senior Member
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,800
Blog Entries: 4

Rep: Reputation: 286Reputation: 286Reputation: 286
There's no point of what permissions the file /root/users.txt have. It just contains entries which get appended in /etc/passwd file.
Command /usr/sbin/newusers is owned by root user, thus you cannot simply use it while using your own or any other user account, irrespective of what's your current working directory i.e. you're in /root directry or in some other directory.

Actually when root invokes this command, it creates a lock file in /tmp, so until execution of this command gets finished, no one else can use this command or can edit /etc/passwd file. This is built-in feature of this command.

In your case, you need to become root to invoke this command. To do this, use:
example-machine$ su - root
Enter password:
example-machine# newusers /root/users.txt
To check creation of users, use:
example-machine# id -a <username>

Last edited by shivaa; 11-26-2012 at 12:26 PM. Reason: Typo


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Permission denied when trying to use the chmod command. stevenworr Linux - Security 2 05-04-2011 11:19 AM
busybox command works, same command within script says permission denied jeroenv Linux - Newbie 2 01-17-2009 03:58 AM
SSH command, permission denied Abstractt Linux - Newbie 2 11-12-2007 07:14 AM
get permission denied when trying to use info command. I nick623 Linux - Newbie 3 12-28-2004 07:06 PM
su command fails with permission denied noahsatellite Linux - Security 6 05-26-2004 04:47 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration