add 'n' user
#newusers
1)
check>>>/etc/passwd
jonny:$1$eb30c0TU$r4ZosogN/Aev83kMS/erq0:1000:1000:Deva-Jonny,,,:/home/jonny:/bin/bash
jonny (Login name)
$1$eb30c0TU$r4ZosogN/Aev83kMS/erq0 (EncPassword)
1000 (User Identifier)
1000 (Group Identifier)
Deva-Jonny,,, (Note)
/home/jonny (Home directory)
/bin/bash (users Shell)
2)
stu001::600:600:stu:/home/stu001:/bin/bash
stu002::601:601:stu:/home/stu002:/bin/bash
stu003::602:602:stu:/home/stu003:/bin/bash
stu004::603:603:stu:/home/stu004:/bin/bash
save as newuser_list.csv
3)
sudo newusers < newuser_list
4)
write passwd in /etc/passwd from /etc/shadow & del /etc/shadow
sudo pwunconv
Ref>
http://jonny.ubuntu-tw.net/2008/03/ubuntunewusers-n.html
2012/03/31
time //ubuntu
ubuntu
sys time (timezone)<>bios time (UTC)
/////////
Usage: hwclock [function] [options...]
Functions:
--show read hardware clock and print result
--set set the rtc to the time given with --date
--hctosys set the system time from the hardware clock
--systohc set the hardware clock to the current system time
--adjust adjust the rtc to account for systematic drift since the clock was last set or adjusted
Options:
--utc the hardware clock is kept in coordinated universal time
--localtime the hardware clock is kept in local time
--date specifies the time to which to set the hardware clock
/////////
time zone
sudo dpkg-reconfigure tzdata
check
date; hwclock --show
set2bios
sudo hwclock --localtime --hctosys
sudo hwclock --systohc
set2hw
hwclock --set
/////////
sudo vi /etc/default/rcS
UTC=yes >>> UTC=no
sudo ntpdate time.stdtime.gov.tw
sudo hwclock -w
/////////
#get timezone
sudo tzselect
#change
sudo ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
#syn
sudo ntpdate pool.ntp.org
#update BIOS
sudo hwclock -w
#scheduled
sudo crontab -e
sys time (timezone)<>bios time (UTC)
/////////
Usage: hwclock [function] [options...]
Functions:
--show read hardware clock and print result
--set set the rtc to the time given with --date
--hctosys set the system time from the hardware clock
--systohc set the hardware clock to the current system time
--adjust adjust the rtc to account for systematic drift since the clock was last set or adjusted
Options:
--utc the hardware clock is kept in coordinated universal time
--localtime the hardware clock is kept in local time
--date specifies the time to which to set the hardware clock
/////////
time zone
sudo dpkg-reconfigure tzdata
check
date; hwclock --show
set2bios
sudo hwclock --localtime --hctosys
sudo hwclock --systohc
set2hw
hwclock --set
/////////
sudo vi /etc/default/rcS
UTC=yes >>> UTC=no
sudo ntpdate time.stdtime.gov.tw
sudo hwclock -w
/////////
#get timezone
sudo tzselect
#change
sudo ln -sf /usr/share/zoneinfo/Asia/Taipei /etc/localtime
#syn
sudo ntpdate pool.ntp.org
#update BIOS
sudo hwclock -w
#scheduled
sudo crontab -e
2012/03/30
ipaddr CentOS-6.2
centos-6.2-i386 'minimal desktop' env
#old
#DEVICE="eth0"
#HWADDR="00:0C:29:AF:21:B6"
#NM_CONTROLLED="yes"
#ONBOOT="no"
#new
DEVICE="eth0"
HWADDR="00:0C:29:AF:21:B6"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=10.11.12.214
NETMASK=255.255.255.0
NETWORK=10.11.12.0
GATEWAY=10.11.12.1
BROADCAST=10.11.12.255
/etc/init.d/network restart
or
service network restart
#old
#DEVICE="eth0"
#HWADDR="00:0C:29:AF:21:B6"
#NM_CONTROLLED="yes"
#ONBOOT="no"
#new
DEVICE="eth0"
HWADDR="00:0C:29:AF:21:B6"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO=static
IPADDR=10.11.12.214
NETMASK=255.255.255.0
NETWORK=10.11.12.0
GATEWAY=10.11.12.1
BROADCAST=10.11.12.255
/etc/init.d/network restart
or
service network restart
2012/03/26
PostgreSQL 9
ubuntu 10.04 + PostgreSQL 9.0 + pgAdmin III 1.12.0
1)
$ sudo vi /etc/apt/sources.list
## Postgres 9 hasn't been backported yet. Manually added repos.
deb http://ppa.launchpad.net/pitti/postgresql/ubuntu lucid main
deb-src http://ppa.launchpad.net/pitti/postgresql/ubuntu lucid main
2)Pitt(PPA Signing Key)
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8683D8A2
3)
$ sudo apt-get update
4)
$ sudo apt-get install postgresql-9.0
$ sudo apt-get install pgadmin3
5)server instrumentation
$ sudo apt-get install postgresql-contrib-9.0
$ sudo -u postgres psql -U postgres -d postgres < /usr/share/postgresql/9.0/contrib/adminpack.sql
Ref>
https://launchpad.net/~pitti/+archive/postgresql
http://www.cheeren.com/node/58
1)
$ sudo vi /etc/apt/sources.list
## Postgres 9 hasn't been backported yet. Manually added repos.
deb http://ppa.launchpad.net/pitti/postgresql/ubuntu lucid main
deb-src http://ppa.launchpad.net/pitti/postgresql/ubuntu lucid main
2)Pitt(PPA Signing Key)
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 8683D8A2
3)
$ sudo apt-get update
4)
$ sudo apt-get install postgresql-9.0
$ sudo apt-get install pgadmin3
5)server instrumentation
$ sudo apt-get install postgresql-contrib-9.0
$ sudo -u postgres psql -U postgres -d postgres < /usr/share/postgresql/9.0/contrib/adminpack.sql
Ref>
https://launchpad.net/~pitti/+archive/postgresql
http://www.cheeren.com/node/58
訂閱:
文章 (Atom)