LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 01-01-2010, 12:27 PM   #16
javimd786
LQ Newbie
 
Registered: Dec 2009
Posts: 11

Rep: Reputation: 0

How to add users in group in linux?
here i whan to ask one thing how can we create users who are already there how can we change to the user to group for example

# useradd king

# groupadd IT

HERE i had create one group IT and user king I want to add user king to the group IT how to do this thing

# useradd -G IT king
this is the wrong method here i am asking is that user name king is already created i want to add that user to IT group how to do this thing
 
Old 01-01-2010, 12:51 PM   #17
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Quote:
Originally Posted by Elixer View Post
1) I have a program installed in Xandros. It does not require instalation you copy the executable file and directories to a directory and just run it at the prompt. I have it running in Xandros. I put the program on My Debian Lenny system and it runs far superior with no lagging. It saves file that allows me to go back to the same place where i lesft off. The file name is Machinarium.sol This file is locacted on my Xandros system and should be (according to the author) on Debian Lenny as follows. /Home/'user name'/macromedia/Flash_Player/#SharedObjects/{RANDOMWORD}/localhost/{PathToYourMachinariumInstallDirectory}/machinarium/Machinarium.sol. It is there on my Xandros system but the only items in /Home/Jon are Desktop and edid.bin. Is there something hidden from me. I have done searches for Macromedia, Machinarium.sol, Flash_Player and nothing comes up. What am I doing wrong. I have looked around with gnome and also at the command prompt with root priveliges. I can save my place in this progrm and return to it so I only make an assumtion that it is realy here on my system but whay can i not find it, even a file search turns up nothing. So frustrating.
I am unfamiliar with Machinarium.sol. However Macromedia flash is not installed by default in debian and is something you do need to get from adobe.com or the non-free repositories. Also in Debian and most other Linux distributions, hidden files and directories have their names start with a "." without the quotes. For example a hidden directory may be named .hidden. You can use the -a option with the ls command to show all. For example

Code:
jared@debian:~$ su
Password:
debian:/home/jared# cd /root
debian:~# ls -a
.              .fwbackups     .loki                .recently-used.xbel
..             .gnome2        .mcop                .ssh
.aptitude      .gnupg         .mcoprc              .VirtualBox
.bash_history  .ICEauthority  .nvidia-settings-rc  .vmware
.bashrc        .kaboom.log    .profile             .wapi
.config        .kde           .pulse               .Xauthority
.dbus          kde3-backup    .pulse-cookie        .xine
.debtags       .local         .qt                  .xsession-errors
I ran that in my root directory as my normal user directory has a bizillion directories and results that would come up, and that much data is not needed for the example. You do not have to be root to us the ls-a command.

I would suggest using the ls -a command on your home directory to see if there is a .macromedia or .adobe folder there. Macromedia is now owned by adobe so it is not adobe flash. Something to be aware of when you are doing your search.

Quote:
Originally Posted by Elixer View Post
2) Ones I figure out where to put this file I will need to know the procedure to set permissions as I have a difrent user name in Xandros and yes, Debian Lenny knows this as I have moved it to my desktop and it shows in gnome with a warning. I Did some reading but I am unsure about the code. It seems that I need to use chmod. There is warning in the reading stating that I can mess things up if I don't know what I am doing. That would be me! There is a swithch that can be used with chmod to set permissions the same as another existing file on my system. Ther reading says to use --reference=file to set permission as another given file Thanks, Jon
chmod is a command used to change permissions. to change ownership you would want to use the command chown.

to change the owner of a directory you would use this command

Code:
chown <new username> <directory to be changed>
As an example say I wanted to change the directory /cars to be owned by user frank. Here is how I would do it.

Code:
chown frank /cars
Now you may want to be aware of the -R option. This is to be recurssive. In other words this would also apply the change to and files and folders located inside of the directory you chown. For example if I run this command

Code:
chown -R frank /cars
The result of the above command will change the ownership of all files and folder inside of /cars as well as the folder /cars to be owned by the user frank.


I hope this helps you out a bit.
Cheers,
Jared
 
Old 01-01-2010, 12:54 PM   #18
worm5252
Member
 
Registered: Oct 2004
Location: Atlanta
Distribution: CentOS, RHEL, HP-UX, OS X
Posts: 567

Rep: Reputation: 57
Quote:
Originally Posted by javimd786 View Post
How to add users in group in linux?
here i whan to ask one thing how can we create users who are already there how can we change to the user to group for example

# useradd king

# groupadd IT

HERE i had create one group IT and user king I want to add user king to the group IT how to do this thing

# useradd -G IT king
this is the wrong method here i am asking is that user name king is already created i want to add that user to IT group how to do this thing
Instead of doing
Code:
# useradd -G IT king
you should do

Code:
usermod -G IT king
 
Old 01-01-2010, 09:58 PM   #19
Elixer
Member
 
Registered: Dec 2009
Location: Massachusetts, USA
Distribution: Debian 8 64
Posts: 121

Original Poster
Rep: Reputation: 16
Silly me, Didn't know about the "."

Quote:
Originally Posted by worm5252 View Post
I am unfamiliar with Machinarium.sol. However Macromedia flash is not installed by default in debian and is something you do need to get from adobe.com or the non-free repositories. Also in Debian and most other Linux distributions, hidden files and directories have their names start with a "." without the quotes. For example a hidden directory may be named .hidden. You can use the -a option with the ls command to show all. For example

Code:
jared@debian:~$ su
Password:
debian:/home/jared# cd /root
debian:~# ls -a
.              .fwbackups     .loki                .recently-used.xbel
..             .gnome2        .mcop                .ssh
.aptitude      .gnupg         .mcoprc              .VirtualBox
.bash_history  .ICEauthority  .nvidia-settings-rc  .vmware
.bashrc        .kaboom.log    .profile             .wapi
.config        .kde           .pulse               .Xauthority
.dbus          kde3-backup    .pulse-cookie        .xine
.debtags       .local         .qt                  .xsession-errors
I ran that in my root directory as my normal user directory has a bizillion directories and results that would come up, and that much data is not needed for the example. You do not have to be root to us the ls-a command.

I would suggest using the ls -a command on your home directory to see if there is a .macromedia or .adobe folder there. Macromedia is now owned by adobe so it is not adobe flash. Something to be aware of when you are doing your search.



chmod is a command used to change permissions. to change ownership you would want to use the command chown.

to change the owner of a directory you would use this command

Code:
chown <new username> <directory to be changed>
As an example say I wanted to change the directory /cars to be owned by user frank. Here is how I would do it.

Code:
chown frank /cars
Now you may want to be aware of the -R option. This is to be recurssive. In other words this would also apply the change to and files and folders located inside of the directory you chown. For example if I run this command

Code:
chown -R frank /cars
The result of the above command will change the ownership of all files and folder inside of /cars as well as the folder /cars to be owned by the user frank.


I hope this helps you out a bit.
Cheers,
Jared
Aparently This "."is not used in Xandros and I had no idea. Is this "." actualy part of the file name or a prefix assigned to it by the OS? Probobly why I could not find it by doing a file search.
I need change the file ownership and I only assume that if I chown -R the directory it will not matter that the directory already has the correct ownership and will only change the file I have a problem with. Thanks so much for the answer, Jon
 
  


Reply


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
pre-install steps mrmilne Linux - Newbie 10 11-03-2009 06:29 PM
trying to prep for install - what's the difference between /home and /usr? bluecog6 Linux - Newbie 5 02-07-2007 05:05 PM
Prep Mdk9.2 install - Win98/Bootmagic Question trike Linux - Newbie 1 01-04-2004 09:27 AM
How to prep a WinXP system to install Redhat 7.3 Zachary Linux - Newbie 10 08-16-2002 01:04 PM
pre-install advice lachlan Linux - Software 2 07-19-2002 07:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:33 PM.

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