General :: Change All Files Belonging To One User To Another User?
Jul 20, 2011
I'm looking for a Linux command that can change ownership of all files belonging to a given user,preferably in a targeted directory, to another specified user. My dream command would look something like this. chuser -R --olduser tom --newuser jerry
This is my scenario... I have a backup file (.tgz) with user and group information preserved in it. It was taken from a web server running Apache and MySQL. The files in the backup are from across the system and contain files from several different users and several system type accounts and it is key that when restored on the new server the settings are not lost. The problem is that the users on the machine the files are being restored to don't match the ones in the backup file. For instance both machines had a MySQL user but they have different user ids and there are several user ids that existed on both machines that belong to different users. This means there is no way to sync the users on the new machine to the ones on the old machine. I can find all the users files with the find command like this...
find /decompressed-backup-dir -uid 1050
or
find /decompressed-backup-dir -user tom
If, as I suspect, there is no way to do what I want with a single command then perhaps there is a way to pipe the results of the find command to another command to handle the ownership change?
I could do this with a PHP script but there are 4GB and tens of thousands of files in the backup so I don't want to use PHP or Perl but I would be happy with a shell script that could handle it.
View 2 Replies
ADVERTISEMENT
Feb 2, 2010
I want to add 50 new users, not on the server yet I want to add them all to group Accounting - with 1 option, not user by user I want to setup a default password for them all, and have it say something like 'You must now change password or no access will be permitted' Any other options I also want to do once, not for each user?
View 3 Replies
View Related
Jan 15, 2010
I am using mint 8 for a 2 weeks, I am noob to linux but I like Mint than any other linux distro which is great alternative to windows. I have a problem regarding password reseting.
1. My laptop automatically get logged in without asking user name and password.
2. I tried to change password for newly created user and root user using graphical way but it does not work.
2. I can perform administrator task using only OEM user which is default inbuilt user of mint.
How can make my laptop to ask password when mint get booted? How to change password for other users?
View 1 Replies
View Related
Oct 5, 2010
How do I disable and change the user password using SSH on a Linux
View 3 Replies
View Related
Sep 3, 2010
This netbook only has a user with non-administrative privs on it and root user but I do not have root's password.Is there a way that I can create a new administrative user of change the current user's group so that it can do sudo commands or have more privs?
View 1 Replies
View Related
Jan 21, 2010
Prelude: OpenSUSE 11.2 (2.6.31.8-0.1-desktop), installed Novell client 2.0 SP2 (novell-client-2.0-sp2-sle11-i586.iso).
I found that if any usual user is logged into a NDS-tree, then _local_ root has full access to user's network shares, including the user's home directory located on remote Netware-server. Is it by design or
have I missed something? Nevertheless in windows local admin has no access to network resources mounted of any other user. If you runas shell (as admin) then admin in principle can't "see" network shares which were mounted (connected) by other users - they are accessible ("visible") per session.
View 3 Replies
View Related
Jul 13, 2010
I'm a new Ubuntu user, I just installed Ubuntu today and I'm loving it. But this issue has been driving me nuts all day, I've searched for hours for something like this and all posts were about external hard drives. I installed Ubuntu 10.04 on my MBP 13" then dual booted into Ubuntu. I can mount and access my MBP hard drive, but when it comes to the Mac home user files, I don't have permission to even READ.
How can I change that? I tried doing so by dual booting into Mac and changing the folder permissions and also making them shared folders but nothing worked.
View 1 Replies
View Related
Apr 15, 2011
Is it possible to copy files from directory of one user to directory of another user in linux?
View 7 Replies
View Related
Oct 28, 2009
Is It possible to change a process running in root-user to non-root-user by setting suid / uid / euid / gid etc... I so please instruct how, when and wat to set in order to change a process running in root-user to non-root user
View 4 Replies
View Related
Mar 4, 2010
I have a uid that I need to change however I need to know the process of doing so as this user is a vital user that has ownership of several running pids on this server. (webserver)
This user (admin) has a uid of 1003 on this server (server-A). However, on all our other servers (server-B-G)the uid is 1001. The reason for changing the uid is that the nfs mount that is mounted on server-A and on all the servers does not work right due to the uid difference. We have diagnosed to this point.
My question ... admin is the owner of several running pids.
So in order to change the uid, do I need to:
- stop ALL pids owned by admin
- >usermod -u 1001 admin
- then start back up the jobs that admin runs
I have verified that there are no files/dirs owned by uid 1003 but the ownership is admin.
I can run a find >find / -uid 1003 - to locate any orphaned files/dirs before I start back up any jobs that require admin ownership.
Then >chown the file/dir.
Does this appear to be a viable plan to get this uid corrected?
View 5 Replies
View Related
Feb 26, 2011
I have installed tftpd on Ubuntu, but I think it not secure very much. So I read its manual, and it says: The server should have the user ID with the lowest possible privilege. I find the server has the root UID:
[code]...
View 3 Replies
View Related
Jul 27, 2011
I have a textfile with name negin.txt in /home and did the following:
Right click → Properties → Permissions → Advanced Permissions → Add Entry → Named User user:wwwrun
Is it possible to do this over the shell?
I tried chown wwwrun /home/negin.txt but got no result. What is wrong here?
View 2 Replies
View Related
Sep 30, 2010
Im trying to run this program and they say I should not run it as root but as a diff user. how to change from root to dif.user. I am using linux CentOS 5.5. Is it a terminal command? How do i create a diff user and log in as it?
View 5 Replies
View Related
Aug 4, 2011
I want change user account "mysql" info like is:
View 4 Replies
View Related
May 31, 2010
For the purpose of running a transmission daemon I have a user called torrent.
I've chowned the download folder and all its contents to torrent:torrent and set permissions so that user/group can read/write.
The transmission daemon is running as the user torrent but I get a "permission denied" error when trying to download. It also won't seed because it can't read the files.
I've tried su-ing as torrent and viewing the folder, I can't do that either but when I use "ls -al" as an administrative user I get "-rwxrwxr-x 1 torrent torrent" or "drwxrwxr-x 4 torrent torrent" (if it's a directory).
This happened after a big upgrade but I can't work out what's going on. I previously had a user called "transmission" doing the same but decided to try deleting that user and starting again to get it to work. As you can see, no such luck.
View 2 Replies
View Related
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
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
Oct 5, 2010
For a user on a Linux host, I need to make everything inaccessible besides his home directory. I have heard that this is usually done by changing the root directory for the user (and setting it to the user's home directory), however I couldn't find the way to do it.
I thought about the chroot command, but it seems it just runs the specified command, considering the specified directory as the root directory. So it seems chroot is not what i need. So my question is: what is the command which changes the user's root directory?
View 7 Replies
View Related
Dec 3, 2008
I want to know how to change a password to an user account. Can someone give me the syntax on how to do this? I was using usermod but it's not working (usermod -p 123456 user1). Is there other way beside usermod? I am using RHEL5.
View 3 Replies
View Related
Jun 16, 2011
I've created a set of users using the newusers command. Unfortunatelly ive messed up and added all users to the 1000 group as primary group instead of giving the group argument as null what would add them to a new group. To make things clear:
The entries should be
user:password:::User Name:/home/user:/bin/bash
but I did
user:password::1000:User Name:/home/user:/bin/bash
I need to create the missing groups. A simple fix could be do a for loop creating a group with the name of each user in my file and then adding the users to it. Are there any dangers of doing it? What impact could this change have? Are there any safer ways?
A combination of the following commands:
Quote:
Add users to a group with the gpasswd command:
# gpasswd -a [user] [group]
To delete existing groups:
# groupdel [group]
To remove users from a group:
# gpasswd -d [user] [group]
If the user is currently logged in, he/she must log out and in again for the change to have effect.
Quote:
for i in (names)
do groupadd $i
gpasswd -a $i $i
Assuming I've created all users in group 1000 I could remove them from it with
Quote:
# gpasswd -d [user] [group]
View 2 Replies
View Related
May 9, 2010
How do I change user's home directory, because right now everything saves into File System and it's almost full(I got windows and Ubuntu installed in the same partition), while the other 120Gb filesystem is unused..
View 9 Replies
View Related
May 3, 2010
Cannot change a user password om mysql Trying to change the cactiuser password but no luck so farThis is what I did:
mysql> use mysql;
Database changed
mysql> SELECT host,user,password FROM user where user='cactiuser';
[code]....
View 1 Replies
View Related
Mar 8, 2010
I'm developing an application in which one user must run java software that I'm compiling as another user. I wanted to give user A permission to see the bin direcory of my workspace, which is in the home directory of user B. I was wondering how can this be done? I gave the bin direcotry full read/execute premissions, but since it's in my home directory user A can't navigate to it.
I know there are a few ways I could get around the problem but they arn't very elegant. I was wondering if there is a simple method for giving a user access to a specific directory without giving access to all the parent directories. I tried symbolic link but user A still can't access it, and a hard link to a directory isn't allowed in Linux. I don't feel like making a hard link to every single file in the bin directory, and I'm not sure that would work anyways, since every recompile overwrites them.
View 7 Replies
View Related
Sep 28, 2010
What is the difference between creating a "regular" user and creating a "system" user on Linux?
For example:
Code:
adduser john
Code:
adduser --system john
Similarly it seems there are normal groups and system groups. Doing an internet search and reading man pages does not give much information on the whole concept of system and regular user/group.
View 1 Replies
View Related
Jul 20, 2010
I want to increase the color depth for my user account in kde. I cannot edit the configuration in /etc/X11. Is it possible?
View 2 Replies
View Related
Sep 12, 2011
Though this might seem like a [URL] question at first glance I don't think it is. I have a mysql database on a server at work. Every time I log in to execute a query, I have to manually select the one database I want from the one database I have, which is a waste of time. Is there any way for me as an end user to set a default?
View 2 Replies
View Related
Mar 23, 2011
I was unable to change the permissions for root node and for other users also. WE have tried all the possibilities like chmod and chmod -R 777 filenem. But we are unable to change that.
View 4 Replies
View Related
Dec 11, 2010
TitleThink user Linux registrations can make a world change?The questionDo you think the registration of Linux users can make people, companies, governments, institutes, and everything related to technology change their opinions (minds)?Introduction My first experience with a PCI used proprietary software since I owned a PC. Starting from the operating system to the programs all was backed by a closed company.EurekaAt the year 2004, I have read a magazine that mentioned the word "Linux", it was the first time I got to know that actually there was other Operating Systems than Windows. I "googled" and "wikipped"(searched), all the information I could get about that new system(for me).
After few searchs the word "Debian GNU/Linux" came up. I have burned the ISO file for a brand new CD and got all enthusiast.ExperienceI had actually complete the command line install, but always thinking for myself "What a waste of time!" (Yeah... such an idiot I was at that time).
After the installation, I booted the distribution and at the minimal error and/or thing that didn't worked like I pretended, I would just say a lot of terrible things and give up.The second chanceOnly at about 2007, I gave Linux other chance(ironic, like Linux was the guilty for my lack of skills. I downloaded and burned the Ubuntu Linux 6.06 Live CD ISO.
I was astonished when the CD booted,
asked for language and actually changed it.
Then the Live Environment "flashed"(appeared).
I was out of words and almost regretted everything I have said about Linux efforts(I still didn't had a open mind tough). For the first time I actually faced-up the problems and issues that came up, but annoying everyone and saying bad stuff(I'm terribly sorry).The enlightenmentOnly at about end of 2009, I started actually wanting to learn how everything worked. That was the time I changed for Slackware Linux distribution. I learned many stuff. But with the time, I realized that the important isn't the Operating System and/or Distribution we use, is the use that we make of it. Nowadays I use about any distribution without complaining much. We need to respect the work of others after all, and we can learn with the mistakes too.
All this to askThe questionDo you think the registration of Linux users can make people, companies, governments, institutes, and everything related to technology change their opinions (minds)?NOTE: This reflects for BSDs, OpenSolaris(now over) and all other related open source software not just Linux.
View 14 Replies
View Related
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
Jul 4, 2010
My default install language is chinese, now I want to change it to english ,how can I do it ?
View 1 Replies
View Related