General :: Adding Users To Existing Group

Aug 26, 2010

I've been asked by my professor to add the list of users to a linux server (not sure of the OS type I think he said debian) but anyway. He gave me this script to add users.

Code: #!/bin/bash
# Script to add a user to Linux system
if [ $(id -u) -eq 0 ]; then
read -p "Enter username : " username
read -s -p "Enter password : " password
egrep "^$username" /etc/passwd >/dev/null
if [ $? -eq 0 ]; then
echo "$username exists!"
exit 1
else
pass=$(perl -e 'print crypt($ARGV[0], "password")' $password)
useradd -m -p $pass $username
[ $? -eq 0 ] && echo "User has been added to system!" || echo "Failed to add a user!"
fi
else
echo "Only root may add a user to the system"
exit 2
fi

I need to see if I can get this script to read a file that list the usernames and their passwords using the pipe command (or some similar command) so I can just do it in one batch. I've done some searching but there are so many vairiations of the code that I've confused myself. Also, I'm not too familiar with linux, it's been a few years since I've used it but in the prior script, I need to add the users to an existing group named "forensics". Which line would I change/add in order to do this?

View 3 Replies


ADVERTISEMENT

Ubuntu Servers :: Adding AD Domain Users Group?

May 4, 2010

I have server 9.04 and joined thru winbind to Windows Domain and subversion installed.Windows AD users can use their own credentials to join and everything is working fine.However the group svn which is used to access the repos in /etc/groups has some users.However I would like to add the domain users group to the svn group but the domain users contains Space. And /etc/groups does not happend to read the space any ideas on how to add "domain users" to the svn group in /etc/groups

View 1 Replies View Related

CentOS 5 Server :: Avoid Adding Users To Group Like Wheel?

Jan 7, 2011

i just want to prevent from now on from all users maybe even root from adding other users to groups like wheel for example. I also want to know how can I prevent from all users to create new groups or add users to new one.real

View 2 Replies View Related

General :: Secondary Group Users Need To Change File Permissions Of Primary Group Files?

Oct 19, 2009

i want secondary users can able to change the files permissions of primary group?user MAC is having www as a primary and httpd as secondary group. But he want to change the file permissions (chmod) httpd group files. Is it possible or not? I think its not possible. If it`s possible then let me know how?

View 3 Replies View Related

General :: Vsftp - Some Users See Files - Some Don't - But All Users Are In Same Group

Jan 18, 2010

When I have different people log into our ftp and browse to the same folder, some people see the files inside, some don't. all the user accounts are in the same group, which has permission to this folder. but the one user who can see the files is the owner. how can i fix it so everyone in that group who's the owner of the folder can see the files?

View 10 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 :: Adding Root To A Group

Jul 4, 2011

I'm seeing on my Fedora 15 box. I want to add the superuser to a group called, say, thisgroup.thisgroup is absent. Surprisingly, when I thought of editing /etc/group, root was present there!Anyone on why groups didn't show my new addition?

View 3 Replies View Related

General :: Adding XP To An Existing Ubuntu System

Oct 4, 2010

I want to move my windows XP image from my old PC's C: and put it onto my new PC, with Ubuntu 9.10 already on it. Will this procedure work?First I'll burn an iso image of the windows C: to a CD or DVD, using the Win XP computer. Then, I'll load a (live Ubuntu), from my thumb drive and boot into my new PC, and move the Ubuntu partition to another location, in order to create the partition needed to install a Windows OS. I know that Windows, God bless them, needs to be first on the HDD. This procedure will destroy the grub loader.Then rebooting should load correctly to the grub bootloader, right?

View 9 Replies View Related

General :: Adding User To A Secondary Group?

Sep 10, 2009

If user1's main group is genetics and one wants to add him/her to group biochem and to assign biochem as his/her secondary group will the following suffice ?

Code:

$ sudo usermod -G biochem user1

I would like for user1 to have genetics as the main group but also belong to biochem. When user1 creates a file, as he/she belongs to main group genetics, I assume the file will be owned by user1 and group owner will be genetics. Ideally files created by user1 should be accessible to users in group genetics(when permissions are tweaked) but not by individuals in group biochem. However, any files with group owner biochem should be accessible to user1 as he/she does belong to biochem as a secondary group. Would having user1 main group genetics, secondary group biochem fulfil this criteria ?

View 5 Replies View Related

General :: Adding SDA1 Partition To Root LVM Group?

Nov 9, 2009

I have a question about LVM. My /dev/sda disk is partitioned into Windows NTFS on sda1, Linux /boot partition on sda2, and the Fedora 10 root (/) LVM partition is on sda3. I have moved my Windows XP to VMware on the Linux system and would like to add the sda1 partition to root LVM group.

View 7 Replies View Related

General :: LVM - Adding New Disk Space To Volume Group?

Feb 7, 2011

I plan to install a server using LVM. I thought a partition schema where /boot would be in an ext4 partition while / /usr /var /home and /opt would be in the LVM. My question is: if I'm putting / into the LVM, is it necessary to divide /usr /var /home and /opt into different logical volumes? If I divide them, would it become harder to maintain when new disk space has to be added to the volume group?

View 7 Replies View Related

Security :: Add A Group Of Users To The Wheel Group?

May 19, 2010

I have a number of users, categorised into various groups. I would like one of those groups ("developers") to be in the wheel group as well. I don't want to just copy the people from the developers group into wheel, because then when that group changes I'll have to change it in two places. Is there a way to specify that anyone in developers is in wheel, and have that be dynamic?

View 7 Replies View Related

General :: Adding Existing Distro Back To Boot Loader?

Mar 19, 2011

Have 3 linux distros on 3 hard drives. lost one distro from boot loader. how do I restore missing distro to boot loader? drive was not written to when one distro (drive) was updated.Example drives a, b, and c each had listing on boot loader, now after upgrade to distro on drive b order on boot loader is drive b then a and none for c.

View 5 Replies View Related

General :: Group Permissions For Ftp Users?

Jun 19, 2011

I need to assign permissions for ftp users. For that I need to create groups with different permissions like upload, download, rename, delete, rename and delete. And the users added to the group need to have that group permissions by default.

View 5 Replies View Related

Server :: Script To Add A Secondary Group To All Users Except System Default Users?

Jun 28, 2009

script which can add a secondary group to all existing users except system users in linux.

View 5 Replies View Related

General :: List Of Users / Administrators In Group?

Aug 31, 2010

I would like to know a command which will tell us,
1. List of users under a group and
2. List of Group administrators in a group.

View 2 Replies View Related

Ubuntu :: How To Map Domain Users To Local Users Group

May 27, 2011

how to map all domain users form group Domain Users to local group users (and maybe some more)? Im using Ubuntu 10.04 x32. Its connected to my domain using Samba and Winbind, I can login using my domain credentials, automatically map user folder form DFS server, but I think that domain users have too much priviledges in the system and want to restrict them as much as possible

View 2 Replies View Related

General :: Installed Open Webmail - Existing Users Cannot Login

May 18, 2010

I am using qmailserver. I login through webmail but today I installed openwebmail instead of webmail. Its ok, but I cannot login my existing users. It login only new users which I created. and email id come with fully qualified name like saran@www.example.com, so I need saran@example.com. How I do this?

View 1 Replies View Related

General :: How To Remove Rwx Permission For Group And Other Users For All Hidden Files

Nov 29, 2010

How would i remove rwx permission for group and other users for all hidden files (except . and ..) inside /root using a one line command.

View 4 Replies View Related

OpenSUSE :: 'users' Is The Default Group For New Users?

Sep 4, 2011

In other Linux distros I've used, new users are assigned to their own group (i.e. user 'joe', group 'joe') by default. To my surprise, when I create new users with my openSUSE 11.4, they are all assigned to the 'users' shared group by default.To test this, I created a new user called 'friends'. From my terminal, I can see how the new user files look like:

joe@linux:~> ls -l /home/friends/
total 40
drwxr-xr-x 2 friends users 4096 Sep 3 11:37 bin

[code]...

View 9 Replies View Related

General :: Changing Password And Adding Users?

May 6, 2011

I am using Mandriva 2010.2 KDE. When I try to change my password, using the Welcome>About Me>Change Password, I am asked to type in my current password, after I press OK, the dialogue box just seems to hang, nothing happens, the computer does not freeze, just the password dialogue box kind of stops responding.

View 3 Replies View Related

General :: Resetting Password And Adding Users - For Acer Aspire One

Aug 27, 2009

I have no fracking clue what my password is and I want to create multiple user accounts. I have no idea whether or not I need to re-install the OS or what..nor can I even begin to imagine how to do so without a CD drive..I should also note I didn't start her up myself.

View 1 Replies View Related

Programming :: Adding New Selections To The Existing Script?

Mar 19, 2010

i have two scripts called:

"type" & "selecttype".

In "type" i have only the name of the products ex.: product1 & product2. Now, i have to ADD product3 which includes sub categories: productA, productB, productC, productD, productE, productF. so my New type script (menu) looks as below:

1) product1
2) product2
3) product3

and my current selectype looks how can I add the new product3 argument with all other multiple selections (productA, productB, productC, productD, productE, productF) into my current selectype (as below which is set only for product1 & product2), so when a user select: 3) product3 from "type" would get a new menu of all the sub categories, and the script would process the new additional arguments.

Here is the copy of my selectype script:

#!/bin/sh
echo SELECTTYPE
export -n selecttypechoice
if [ "${upgrade}" == "yes" ] ; then

[code]....

View 5 Replies View Related

Fedora :: Adding Second Drive To Existing System For RAID1?

Jul 31, 2011

I have an existing Fedora 15 system installed from scratch.I've ordered a harddrive identical to my SDA and want to add it to my existing system as a RAID1 setup.I've googled around and cannot find recent clear instructions how to accomplish this. I don't want to reinstall everything from scratch. It should be possible to create the RAID1 using the existing data disk and then mirror everything up?

View 1 Replies View Related

Ubuntu Installation :: Adding Windows XP To Existing 10.10 Install

Mar 11, 2011

After spending almost 100 hours trying to get my MP3 player working I have decided to add an XP partition and use it there.I am an Ubuntu newbie and am finding the whole "new-dos" experience too frustrating for words.Can someone please explain in ENGLISH for an IDIOT how I can do this.

View 9 Replies View Related

Red Hat / Fedora :: Adding Existing Memory In Sdb1 To Sda1?

Nov 30, 2010

Here is the output of disk free space

# df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mapper/VolGroup00-LogVol00 940287756 3320512 888432924 1% /
/dev/sda1 101086 21142 74725 23% /boot
tmpfs 7730504 0 7730504 0% /dev/shm
/dev/sdb1 2884158292 74736 273757667 1% /data

Now,I wanna add a large amount of memory in sdb1 to sda1 to increase the available memory.Is there a way I can do this?

View 4 Replies View Related

Networking :: Adding Wireless Router To An Existing Network

Dec 22, 2010

I have an existing network that connects to the 'net via a Linux-based firewall. That system has two ethernet interfaces: one to the DSL modem and the other to the internal switch. Future plans were for adding a second "internal" interface with the idea of moving servers into that (think DMZ). But while I was planning for that, the missus has decided she wants to pick up a Windows laptop and would like to be able to use it wirelessly at home. I have access to a (free!) Netgear WGR614L and was hoping it would work. Unfortunately, I'm unsure how to add the wireless capability to our network.

Questions:

Is it best -- or even possible -- to use one the wireless router for this?

Is it possible to merely hang the Netgear router off the internal switch and set it up for the wireless users? Or...

Would I need to add another ethernet interface to the firewall and hang the router off that? The address of this new interface would act as the default route for the wireless users. Then I'd need to (I assume) add more rules to the iptables configuration to deal with the new network. (I sort of like this option -- it it's actually feasible -- as I can easily shut down any wireless access by logging into the firewall and stopping the interface connecting the wireless router.)

I've taken a look at the setup guide on the CD that came with the router and it assumes that you have a modem connecting your PC to the internet. The instructions have you placing the wireless router between the modem and that PC. For our network, that would have the wireless access coming into the "dirty" side of the firewall. (Not what I would like.)

View 4 Replies View Related

Software :: Adding Partitions To An Existing Image File?

Jun 15, 2009

I have 2 image files, image 1 which is 16MB, has multiple partitions, where the boot partition has a 2.4 kernel in it, and image 2, which is 32MB, has a single partition with a 2.6 kernel.

I wish to add those extra partitions from image 1, into image 2, either by adding them within the 32MB(which means cutting back on the size of the existing partition), or adding them to the end of the image(which means extending the image beyond 32MB).

The boot partition for both images is ext2, while the rest of the partitions in image 1 is just raw data.

I'm working with these images in Mandriva Linux 2009.

How can I achieve what I want to do? I think it should be with fdisk and/or mkfs but I'm not sure how? I've tried using gparted to regenerate the partitions from a new image file with the following steps:
dd if=/dev/zero of=image.img bs=32M count=1
gparted image.img

Then I created a 30M boot partition. However, I'm not able to create the rest of the partitions as they are smaller than 1MB, which seems to be the min supported. I need precise control of the start/ending sectors of each partition.

View 1 Replies View Related

Ubuntu Security :: Adding User To Admin Group

Jun 15, 2010

I'm trying to edit a "xl2tpd.conf" file but it always says I have no write permission tried to add my account to admin group but it says something about not able to lock on password try later.

View 3 Replies View Related

Ubuntu :: Edit The Bootloader Entries (remove Some Existing Ones - Not Adding Any)

Mar 31, 2010

I installed Ubuntu in a dual-boot with Windows 7, and installed the bootloader (GRUB? However, I have some weird Windows XP Embedded entry! I also have a lot of different boot options for Ubuntu. All I want is my Windows 7 entry (picked up as Windows Vista) and my main Ubuntu entry. How can I edit the bootloader entries (remove some existing ones, not adding any) so I have only two on there?

View 4 Replies View Related







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